From 6072fd8971a122b1be207e865acd79491556b7a9 Mon Sep 17 00:00:00 2001 From: Offray Date: Thu, 18 Jul 2024 16:26:32 -0500 Subject: [PATCH] Retaking taging as a way to improve document export/import. --- src/MiniDocs/LeTextSnippet.extension.st | 3 +-- src/MiniDocs/LeTextualSnippet.extension.st | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/MiniDocs/LeTextSnippet.extension.st b/src/MiniDocs/LeTextSnippet.extension.st index 5a65a0e..367f9ee 100644 --- a/src/MiniDocs/LeTextSnippet.extension.st +++ b/src/MiniDocs/LeTextSnippet.extension.st @@ -61,6 +61,5 @@ LeTextSnippet >> parentId [ { #category : #'*MiniDocs' } LeTextSnippet >> taggedWith: aString [ - self metadata at: 'tags' ifPresent: [ (self metadata at: 'tags') add: aString; yourself ] ifAbsentPut: [ Set new ]. - ^ self metadata at: 'tags' + self tags add: aString. ] diff --git a/src/MiniDocs/LeTextualSnippet.extension.st b/src/MiniDocs/LeTextualSnippet.extension.st index 55850e5..f83aa95 100644 --- a/src/MiniDocs/LeTextualSnippet.extension.st +++ b/src/MiniDocs/LeTextualSnippet.extension.st @@ -81,6 +81,11 @@ LeTextualSnippet >> contentAsStringCustomized [ ifFalse: [ ^ self contentAsString ] ] +{ #category : #'*MiniDocs' } +LeTextualSnippet >> extra [ + ^ self optionAt: 'extra' ifAbsentPut: [ Dictionary new ] +] + { #category : #'*MiniDocs' } LeTextualSnippet >> markdeepCustomCloser [ ^ '' @@ -134,6 +139,7 @@ LeTextualSnippet >> metadataUpdate [ at: 'modified' put: self latestEditTime asString; at: 'creator' put: createEmailSanitized; at: 'modifier' put: editEmailSanitized; + at: 'extra' put: self extra; yourself ] @@ -151,5 +157,5 @@ LeTextualSnippet >> sanitizeMetadata [ { #category : #'*MiniDocs' } LeTextualSnippet >> tags [ - ^ self metadata at: 'tags' ifAbsentPut: [ Set new ] + ^ self extra at: 'tags' ifAbsentPut: [ Set new ] ]