2022-07-19 23:27:29 +00:00
|
|
|
Extension { #name : #LePharoSnippet }
|
|
|
|
|
2022-07-26 22:59:22 +00:00
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> contentAsStringCustomized [
|
2022-07-27 17:57:57 +00:00
|
|
|
| thisObject |
|
2022-07-26 22:59:22 +00:00
|
|
|
(self tags includes: 'output') ifFalse: [ ^ self contentAsString ].
|
2022-07-27 17:57:57 +00:00
|
|
|
thisObject := ((self page sharedVariablesBindings) at: self detectObject) value.
|
|
|
|
^ thisObject perform: self detectMessage trimmed asSymbol.
|
2022-07-26 22:59:22 +00:00
|
|
|
]
|
|
|
|
|
2022-09-29 23:54:23 +00:00
|
|
|
{ #category : #'*MiniDocs' }
|
2023-10-31 18:04:47 +00:00
|
|
|
LePharoSnippet >> fromMarkdeep: markdeepDiv [
|
2022-09-29 23:54:23 +00:00
|
|
|
|
2023-10-20 17:59:17 +00:00
|
|
|
^ markdeepDiv asSnippetDictionary asLepiterSnippet
|
2022-09-29 23:54:23 +00:00
|
|
|
]
|
|
|
|
|
2024-02-08 13:30:17 +00:00
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> fromString: aString [
|
|
|
|
|
|
|
|
self code: aString
|
|
|
|
]
|
|
|
|
|
2022-07-19 23:27:29 +00:00
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> markdeepCustomCloser [
|
2022-07-25 23:51:28 +00:00
|
|
|
^ String streamContents: [ :stream |
|
2022-07-19 23:27:29 +00:00
|
|
|
stream
|
|
|
|
nextPutAll: '~~~'; lf;
|
|
|
|
nextPutAll: '</script>'; lf.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> markdeepCustomOpener [
|
2022-07-25 23:51:28 +00:00
|
|
|
^ String streamContents: [ :stream |
|
2022-07-19 23:27:29 +00:00
|
|
|
stream
|
|
|
|
nextPutAll: '<script type="preformatted">'; lf;
|
|
|
|
nextPutAll: '~~~ Smalltalk'; lf
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> markdownCustomCloser [
|
2022-07-26 22:59:22 +00:00
|
|
|
(self tags includes: 'output') ifTrue: [^ String with: Character lf].
|
2022-07-19 23:27:29 +00:00
|
|
|
^ String streamContents: [:stream |
|
|
|
|
stream
|
|
|
|
nextPutAll: '~~~'; lf
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*MiniDocs' }
|
|
|
|
LePharoSnippet >> markdownCustomOpener [
|
2022-07-26 22:59:22 +00:00
|
|
|
(self tags includes: 'output') ifTrue: [ ^ String with: Character lf ].
|
|
|
|
^ String
|
|
|
|
streamContents: [ :stream |
|
|
|
|
stream
|
|
|
|
nextPutAll: '~~~ Smalltalk';
|
|
|
|
lf ]
|
2022-07-19 23:27:29 +00:00
|
|
|
]
|