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 } { #category : #accessing }
HedgeDoc >> asLePage [ HedgeDoc >> asLePage [
| newPage snippet | | newPage sanitizedMarkdown |
snippet := LeTextSnippet new sanitizedMarkdown := self bodyWithoutTitleHeader promoteMarkdownHeaders.
string: self bodyWithoutTitleHeader promoteMarkdownHeaders.
newPage := LePage new newPage := LePage new
initializeTitle: self title; initializeTitle: self title.
addSnippet: snippet; sanitizedMarkdown markdownSplitted do: [:lines | | snippet |
yourself. snippet := LeTextSnippet new
string: lines asStringWithCr.
newPage
addSnippet: snippet;
yourself
].
newPage incomingLinks. newPage incomingLinks.
newPage options newPage options
at: 'originalMetadata' put: self metadata; at: 'originalMetadata' put: self metadata;