Fixing image link importation for descriptions with links inside.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-04-26 08:48:53 -05:00
parent 5ec6ea6377
commit 089eb8c2eb

View File

@ -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
] ]