Improving Tiddler tags management/exportation.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-07-05 21:33:49 -05:00
parent b62c642ccd
commit b3cbc5ba9f

View File

@ -48,7 +48,7 @@ Tiddler >> asDictionary [
at: 'title' put: self title; at: 'title' put: self title;
at: 'text' put: self text; at: 'text' put: self text;
at: 'created' put: self created; at: 'created' put: self created;
at: 'tags' put: self tags asArray; at: 'tags' put: self tagsAsString;
at: 'type' put: self type; at: 'type' put: self type;
at: 'creator' put: self creator; at: 'creator' put: self creator;
at: 'modifier' put: self modifier; at: 'modifier' put: self modifier;
@ -488,6 +488,17 @@ Tiddler >> tags: anObject [
tags := anObject tags := anObject
] ]
{ #category : #accessing }
Tiddler >> tagsAsString [
| response |
self tags ifEmpty: [^ '' ].
response := '' writeStream.
self tags do: [:tag |
response nextPutAll: '[[', tag, ']]'
].
^ response contents
]
{ #category : #accessing } { #category : #accessing }
Tiddler >> text [ Tiddler >> text [