Debugging tags reformating.
This commit is contained in:
parent
bde6c31869
commit
a0aabc55f0
@ -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).
|
||||
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user