Improved Markdeep exporter for snippets metadata readability.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-10-31 13:13:31 -05:00
parent 9163d0b145
commit 056dad228a
3 changed files with 9 additions and 4 deletions

View File

@ -190,6 +190,11 @@ LePage >> removeSnippetsMetadata [
ifTrue: [ snippet options removeKey: 'metadata' ] ]
]
{ #category : #'*MiniDocs' }
LePage >> sanitizeMetadata [
self allChildrenDepthFirst do: [:snippet | snippet sanitizeMetadata ]
]
{ #category : #'*MiniDocs' }
LePage >> sharedVariablesBindings [
| codeSnippets shared |

View File

@ -10,7 +10,7 @@ LeTextualSnippet >> asMarkdeep [
output
nextPutAll: '<div st-class="' , self class greaseString , '"';
nextPut: Character lf;
nextPutAll: ' st-data="' , (STON toString: self metadata) , '">';
nextPutAll: ' st-data="' , (STON toStringPretty: self metadata) , '">';
nextPut: Character lf;
nextPutAll: self markdeepCustomOpener;
nextPutAll: self contentAsString;
@ -19,7 +19,7 @@ LeTextualSnippet >> asMarkdeep [
nextPutAll: '</div>';
nextPut: Character lf;
nextPut: Character lf.
^ output contents
^ output contents withInternetLineEndings
]
{ #category : #'*MiniDocs' }

View File

@ -26,8 +26,8 @@ LeYoutubeReferenceSnippet >> metadataDiv [
output
nextPutAll: '<div st-class="' , self class greaseString , '"';
nextPut: Character lf;
nextPutAll: ' st-data="' , (STON toString: self metadata) , '">'.
^ output.
nextPutAll: ' st-data="' , (STON toStringPretty: self metadata) , '">'.
^ output contents withInternetLineEndings.
]
{ #category : #'*MiniDocs' }