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

32 lines
833 B
Smalltalk

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.
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePharoSnippet >> markdeepCustomCloser [
^ String streamContents: [:stream |
stream
nextPutAll: '~~~'; lf;
nextPutAll: '</script>'; lf.
]
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePharoSnippet >> markdeepCustomOpener [
^ String streamContents: [:stream |
stream
nextPutAll: '<script type="preformatted">'; lf;
nextPutAll: '~~~ Smalltalk'; lf
]
]