Debugging image links with links in the description.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-04-22 14:59:56 -05:00
parent 0c45ccb39e
commit 7dc0bdaac0
1 changed files with 8 additions and 1 deletions

View File

@ -32,7 +32,14 @@ XMLElement >> sanitizedContent [
accept: CMBlockVisitor new.
linkParserNodes := linkParser children first children.
linkParserNodes size = 1
ifTrue: [ sanitizedText := linkParserNodes first label text ]
ifTrue: [
linkParserNodes first className = 'PPCMLink'
ifTrue: [ sanitizedText := linkParserNodes first label text]
ifFalse: [
sanitizedText := (linkParserNodes first text splitOn: '](') first.
sanitizedText := sanitizedText copyReplaceAll: '![' with: ''
]
]
ifFalse: [
sanitizedText := '' writeStream.
linkParserNodes allButLast do: [:each |