From 1a2293332e7f59f0a50a41c56970a58bd3740c9b Mon Sep 17 00:00:00 2001 From: Ruidajo Date: Fri, 11 Feb 2022 16:41:25 -0500 Subject: [PATCH] Fixing Markdeep exportation. --- .../LeTextSnippet.extension.st | 18 ++++++++++++++++++ .../LeTextualSnippet.extension.st | 8 +++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/repository/Grafoscopio-Utils/LeTextSnippet.extension.st b/repository/Grafoscopio-Utils/LeTextSnippet.extension.st index 41c4d3c..8e11f2d 100644 --- a/repository/Grafoscopio-Utils/LeTextSnippet.extension.st +++ b/repository/Grafoscopio-Utils/LeTextSnippet.extension.st @@ -9,6 +9,24 @@ LeTextSnippet >> contentFrom: markdeepDiv [ self string: sanitized. ] +{ #category : #'*Grafoscopio-Utils-Core' } +LeTextSnippet >> metadata [ + + ^ self optionAt: 'metadata' ifAbsentPut: [ self metadataInit ] +] + +{ #category : #'*Grafoscopio-Utils-Core' } +LeTextSnippet >> metadataInit [ + + ^ OrderedDictionary new + at: 'id' put: self uidString; + at: 'created' put: self createTime asString; + at: 'modified' put: self latestEditTime asString; + at: 'creator' put: self createEmail asString; + at: 'modifier' put: self editEmail asString; + yourself +] + { #category : #'*Grafoscopio-Utils-Core' } LeTextSnippet >> options [ ^ options diff --git a/repository/Grafoscopio-Utils/LeTextualSnippet.extension.st b/repository/Grafoscopio-Utils/LeTextualSnippet.extension.st index 9ed3dc2..53452e8 100644 --- a/repository/Grafoscopio-Utils/LeTextualSnippet.extension.st +++ b/repository/Grafoscopio-Utils/LeTextualSnippet.extension.st @@ -31,6 +31,12 @@ LeTextualSnippet >> markdeepCustomOpener [ ^ '' ] +{ #category : #'*Grafoscopio-Utils-Core' } +LeTextualSnippet >> metadata [ + + ^ self optionAt: 'metadata' ifAbsentPut: [ self metadataInit ] +] + { #category : #'*Grafoscopio-Utils-Core' } LeTextualSnippet >> metadataInit [ | surrogate | @@ -49,5 +55,5 @@ LeTextualSnippet >> metadataInit [ { #category : #'*Grafoscopio-Utils-Core' } LeTextualSnippet >> options [ - ^ self metadata at: 'options' + ^ options ]