This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-10-10 09:19:04 -05:00
commit c0f7ebe803

View File

@ -11,11 +11,13 @@ LePharoSnippet >> contentAsStringCustomized [
{ #category : #'*MiniDocs' }
LePharoSnippet >> contentFrom: markdeepDiv [
| sanitizedStringText metadata |
| sanitizedStringText metadata joinedText |
metadata := STON fromString: (markdeepDiv attributes at: 'st-data').
sanitizedStringText := markdeepDiv contentString lines reject: [ :line | line beginsWith: '~~~' ].
sanitizedStringText := "(Character cr asString)" '' join: sanitizedStringText.
self code: sanitizedStringText;
sanitizedStringText := markdeepDiv contentString lines.
sanitizedStringText := sanitizedStringText copyFrom: 4 to: sanitizedStringText size -2.
joinedText := '' writeStream.
sanitizedStringText do: [ :line | joinedText nextPutAll: line; nextPut: Character lf ].
self code: joinedText contents allButLast;
uid: (LeUID new uidString: (metadata at: 'id'));
parent: (metadata at: 'parent');
createTime: (LeTime new time: ((metadata at: 'created')asDateAndTime));