Fixing pharo snippet parsing for importer.
This commit is contained in:
parent
9371ddfef6
commit
a833a6245b
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user