diff --git a/src/MiniDocs/LeCodeSnippet.extension.st b/src/MiniDocs/LeCodeSnippet.extension.st index f4fba87..71abad1 100644 --- a/src/MiniDocs/LeCodeSnippet.extension.st +++ b/src/MiniDocs/LeCodeSnippet.extension.st @@ -15,7 +15,7 @@ LeCodeSnippet >> metadataUpdate [ at: 'parent' put: surrogate; at: 'created' put: self createTime asString; at: 'modified' put: self latestEditTime asString; - at: 'creator' put: self createEmail asString; - at: 'modifier' put: self editEmail asString; + at: 'creator' put: self createEmail asString withoutXMLTagDelimiters; + at: 'modifier' put: self editEmail asString withoutXMLTagDelimiters; yourself ] diff --git a/src/MiniDocs/LeTextualSnippet.extension.st b/src/MiniDocs/LeTextualSnippet.extension.st index 2523f7d..a38d1b4 100644 --- a/src/MiniDocs/LeTextualSnippet.extension.st +++ b/src/MiniDocs/LeTextualSnippet.extension.st @@ -66,7 +66,7 @@ LeTextualSnippet >> markdownCustomOpener [ { #category : #'*MiniDocs' } LeTextualSnippet >> metadata [ - ^ self optionAt: 'metadata' ifAbsentPut: [ self metadataUpdate ] + ^ self metadataUpdate ] { #category : #'*MiniDocs' } @@ -76,7 +76,7 @@ LeTextualSnippet >> metadataUpdate [ editEmailSanitized := self editEmail asString withoutXMLTagDelimiters. ^ OrderedDictionary new at: 'id' put: self uidString; - at: 'parent' put: self parent uuid; + at: 'parent' put: self parent uid; at: 'created' put: self createTime asString; at: 'modified' put: self latestEditTime asString; at: 'creator' put: createEmailSanitized; @@ -91,11 +91,12 @@ LeTextualSnippet >> options [ { #category : #'*MiniDocs' } LeTextualSnippet >> sanitizeMetadata [ - self options removeKey: 'metadata'. + self options ifNil: [^ self ]. + self options removeKey: 'metadata' ifAbsent: [^ self ]. self metadata keysAndValuesDo: [:k :v | - (v includesAny: #($< $>)) + (v asString includesAny: #($< $>)) ifTrue: [ - self metadata at: k put: (v copyWithoutXMLDelimiters) + self metadata at: k put: (v asString copyWithoutXMLDelimiters) ] ] ]