Markdown crude semantic splits when converting to LePage.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-11-03 15:06:58 -05:00
parent 96903d8627
commit 33f3a9a0c2

View File

@ -29,13 +29,17 @@ HedgeDoc class >> newDefault [
{ #category : #accessing }
HedgeDoc >> asLePage [
| newPage snippet |
snippet := LeTextSnippet new
string: self bodyWithoutTitleHeader promoteMarkdownHeaders.
| newPage sanitizedMarkdown |
sanitizedMarkdown := self bodyWithoutTitleHeader promoteMarkdownHeaders.
newPage := LePage new
initializeTitle: self title;
addSnippet: snippet;
yourself.
initializeTitle: self title.
sanitizedMarkdown markdownSplitted do: [:lines | | snippet |
snippet := LeTextSnippet new
string: lines asStringWithCr.
newPage
addSnippet: snippet;
yourself
].
newPage incomingLinks.
newPage options
at: 'originalMetadata' put: self metadata;