Fixing image link importation for descriptions with links inside.
This commit is contained in:
parent
5ec6ea6377
commit
089eb8c2eb
@ -47,16 +47,15 @@ LePictureSnippet >> fromMarkdeep: markdeepDiv [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePictureSnippet >> fromString: aString [
|
LePictureSnippet >> fromString: aStringArray [
|
||||||
"aString should be a valid Markdown/Markdeep image string"
|
"aStringArray should contain as first element the sanitized string and
|
||||||
| args captionTemp urlTemp |
|
as second the full original image Link string, which may contains links in the description."
|
||||||
|
| args urlTemp |
|
||||||
|
|
||||||
args := aString splitOn: ']('.
|
args := aStringArray second splitOn: ']('.
|
||||||
captionTemp := args first.
|
urlTemp := args last.
|
||||||
captionTemp := captionTemp copyFrom: 3 to: captionTemp size.
|
|
||||||
urlTemp := args second.
|
|
||||||
urlTemp := urlTemp copyFrom: 1 to: urlTemp size - 1.
|
urlTemp := urlTemp copyFrom: 1 to: urlTemp size - 1.
|
||||||
self caption: captionTemp.
|
self caption: aStringArray first.
|
||||||
self urlString: urlTemp.
|
self urlString: urlTemp.
|
||||||
^ self
|
^ self
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user