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
1 changed files with 7 additions and 8 deletions

View File

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