Fixing metadata sanitization/exportation.
This commit is contained in:
parent
bb75994dd0
commit
0987d4520f
@ -15,7 +15,7 @@ LeCodeSnippet >> metadataUpdate [
|
|||||||
at: 'parent' put: surrogate;
|
at: 'parent' put: surrogate;
|
||||||
at: 'created' put: self createTime asString;
|
at: 'created' put: self createTime asString;
|
||||||
at: 'modified' put: self latestEditTime asString;
|
at: 'modified' put: self latestEditTime asString;
|
||||||
at: 'creator' put: self createEmail asString;
|
at: 'creator' put: self createEmail asString withoutXMLTagDelimiters;
|
||||||
at: 'modifier' put: self editEmail asString;
|
at: 'modifier' put: self editEmail asString withoutXMLTagDelimiters;
|
||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
@ -66,7 +66,7 @@ LeTextualSnippet >> markdownCustomOpener [
|
|||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeTextualSnippet >> metadata [
|
LeTextualSnippet >> metadata [
|
||||||
|
|
||||||
^ self optionAt: 'metadata' ifAbsentPut: [ self metadataUpdate ]
|
^ self metadataUpdate
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
@ -76,7 +76,7 @@ LeTextualSnippet >> metadataUpdate [
|
|||||||
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
editEmailSanitized := self editEmail asString withoutXMLTagDelimiters.
|
||||||
^ OrderedDictionary new
|
^ OrderedDictionary new
|
||||||
at: 'id' put: self uidString;
|
at: 'id' put: self uidString;
|
||||||
at: 'parent' put: self parent uuid;
|
at: 'parent' put: self parent uid;
|
||||||
at: 'created' put: self createTime asString;
|
at: 'created' put: self createTime asString;
|
||||||
at: 'modified' put: self latestEditTime asString;
|
at: 'modified' put: self latestEditTime asString;
|
||||||
at: 'creator' put: createEmailSanitized;
|
at: 'creator' put: createEmailSanitized;
|
||||||
@ -91,11 +91,12 @@ LeTextualSnippet >> options [
|
|||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeTextualSnippet >> sanitizeMetadata [
|
LeTextualSnippet >> sanitizeMetadata [
|
||||||
self options removeKey: 'metadata'.
|
self options ifNil: [^ self ].
|
||||||
|
self options removeKey: 'metadata' ifAbsent: [^ self ].
|
||||||
self metadata keysAndValuesDo: [:k :v |
|
self metadata keysAndValuesDo: [:k :v |
|
||||||
(v includesAny: #($< $>))
|
(v asString includesAny: #($< $>))
|
||||||
ifTrue: [
|
ifTrue: [
|
||||||
self metadata at: k put: (v copyWithoutXMLDelimiters)
|
self metadata at: k put: (v asString copyWithoutXMLDelimiters)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user