2022-02-02 23:35:39 +00:00
|
|
|
Extension { #name : #LeTextSnippet }
|
|
|
|
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
|
|
LeTextSnippet >> contentFrom: markdeepDiv [
|
|
|
|
| sanitized |
|
|
|
|
sanitized := markdeepDiv contentString.
|
|
|
|
sanitized := sanitized allButFirst.
|
|
|
|
sanitized := sanitized allButLast.
|
|
|
|
self string: sanitized.
|
|
|
|
]
|
2022-02-03 18:01:35 +00:00
|
|
|
|
|
|
|
{ #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: 'title' put: self contentAsString;
|
|
|
|
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
|
|
|
|
]
|