Implementing page "semantic splitters".

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-11-02 18:12:46 -05:00
parent 0ce6b89b6c
commit 37d6000702

View File

@ -17,3 +17,18 @@ ByteString >> email [
"Quick fix for importing Lepiter pages that have a plain ByteString field as email." "Quick fix for importing Lepiter pages that have a plain ByteString field as email."
^ self ^ self
] ]
{ #category : #'*MiniDocs' }
ByteString >> splitLines [
"I'm useful for conversions between the HedgeDoc Markdown variant and Lepiter page snippets.
I provide broad places to where semantic breaks should be located in a page,
depending on headers or admonitions to create pages snippets with similar divisions.
Further page splits should be provided manually by the document author."
| response |
response := OrderedDictionary new.
response := response
addAll: self markdownHeaders;
addAll: self admonitionStartingLines;
yourself.
^ (response associations sorted: [ :x :y | x key < y key ]) asOrderedDictionary
]