From b3cbc5ba9fe34b8240a8504ab2434545e1c23d9f Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 5 Jul 2023 21:33:49 -0500 Subject: [PATCH] Improving Tiddler tags management/exportation. --- repository/TiddlyWiki/Tiddler.class.st | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index b43d106..4937ce4 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -48,7 +48,7 @@ Tiddler >> asDictionary [ at: 'title' put: self title; at: 'text' put: self text; at: 'created' put: self created; - at: 'tags' put: self tags asArray; + at: 'tags' put: self tagsAsString; at: 'type' put: self type; at: 'creator' put: self creator; at: 'modifier' put: self modifier; @@ -488,6 +488,17 @@ Tiddler >> 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 } Tiddler >> text [