Debugging tags reformating.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-08-12 15:20:46 -05:00
parent a0aabc55f0
commit 4fab465883

View File

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