Debugging tags reformating.
This commit is contained in:
parent
bde6c31869
commit
a0aabc55f0
@ -596,13 +596,16 @@ Tiddler >> tagsAsString [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Tiddler >> tagsReformating [
|
Tiddler >> tagsReformating [
|
||||||
| response sanitized |
|
| response sanitized tagsInBrackets |
|
||||||
self tags class ~= ByteString ifTrue: [ ^ self ].
|
self tags class ~= ByteString ifTrue: [ ^ self ].
|
||||||
response := Set new.
|
response := Set new.
|
||||||
sanitized := self tags trimLeft: [:char | char = $[ ].
|
tagsInBrackets := self rawLinksIn: self tags.
|
||||||
sanitized := sanitized trimRight: [:char | char = $] ].
|
tagsInBrackets ifNotEmpty: [
|
||||||
|
tagsInBrackets do: [:tag | sanitized := self tags copyReplaceAll: tag with: ''. ]
|
||||||
|
].
|
||||||
|
sanitized := sanitized copyReplaceAll: '[[]] ' with: ''.
|
||||||
response addAll: (sanitized trimmed splitOn: Character space) asSet.
|
response addAll: (sanitized trimmed splitOn: Character space) asSet.
|
||||||
self tags: response.
|
self tags: (response union: tagsInBrackets).
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user