Debugging tags reformating.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-08-12 15:03:23 -05:00
parent bde6c31869
commit a0aabc55f0

View File

@ -596,13 +596,16 @@ Tiddler >> tagsAsString [
{ #category : #accessing }
Tiddler >> tagsReformating [
| response sanitized |
| response sanitized tagsInBrackets |
self tags class ~= ByteString ifTrue: [ ^ self ].
response := Set new.
sanitized := self tags trimLeft: [:char | char = $[ ].
sanitized := sanitized trimRight: [:char | char = $] ].
tagsInBrackets := self rawLinksIn: self tags.
tagsInBrackets ifNotEmpty: [
tagsInBrackets do: [:tag | sanitized := self tags copyReplaceAll: tag with: ''. ]
].
sanitized := sanitized copyReplaceAll: '[[]] ' with: ''.
response addAll: (sanitized trimmed splitOn: Character space) asSet.
self tags: response.
self tags: (response union: tagsInBrackets).
]