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' }
|
||||
LePictureSnippet >> fromString: aString [
|
||||
"aString should be a valid Markdown/Markdeep image string"
|
||||
| args captionTemp urlTemp |
|
||||
LePictureSnippet >> fromString: aStringArray [
|
||||
"aStringArray should contain as first element the sanitized string and
|
||||
as second the full original image Link string, which may contains links in the description."
|
||||
| args urlTemp |
|
||||
|
||||
args := aString splitOn: ']('.
|
||||
captionTemp := args first.
|
||||
captionTemp := captionTemp copyFrom: 3 to: captionTemp size.
|
||||
urlTemp := args second.
|
||||
args := aStringArray second splitOn: ']('.
|
||||
urlTemp := args last.
|
||||
urlTemp := urlTemp copyFrom: 1 to: urlTemp size - 1.
|
||||
self caption: captionTemp.
|
||||
self caption: aStringArray first.
|
||||
self urlString: urlTemp.
|
||||
^ self
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user