GrafoscopioUtils/repository/Grafoscopio-Utils/LePharoSnippet.extension.st

32 lines
833 B
Smalltalk
Raw Normal View History

2022-01-28 21:55:44 +00:00
Extension { #name : #LePharoSnippet }
{ #category : #'*Grafoscopio-Utils-Core' }
LePharoSnippet >> contentFrom: markdeepDiv [
| sanitized divContents |
divContents := markdeepDiv contentString.
sanitized := String streamContents: [:stream |
(divContents lines copyFrom: 4 to: divContents lines size - 2) do: [:line |
stream nextPutAll: line; lf
]
].
self code: sanitized contents allButLast.
]
2022-01-28 21:55:44 +00:00
{ #category : #'*Grafoscopio-Utils-Core' }
LePharoSnippet >> markdeepCustomCloser [
^ String streamContents: [:stream |
stream
nextPutAll: '~~~'; lf;
nextPutAll: '</script>'; lf.
]
2022-01-28 21:55:44 +00:00
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePharoSnippet >> markdeepCustomOpener [
^ String streamContents: [:stream |
stream
nextPutAll: '<script type="preformatted">'; lf;
nextPutAll: '~~~ Smalltalk'; lf
]
2022-01-28 21:55:44 +00:00
]