Markdown crude semantic splits when converting to LePage.
This commit is contained in:
parent
96903d8627
commit
33f3a9a0c2
@ -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.
|
||||||
|
sanitizedMarkdown markdownSplitted do: [:lines | | snippet |
|
||||||
|
snippet := LeTextSnippet new
|
||||||
|
string: lines asStringWithCr.
|
||||||
|
newPage
|
||||||
addSnippet: snippet;
|
addSnippet: snippet;
|
||||||
yourself.
|
yourself
|
||||||
|
].
|
||||||
newPage incomingLinks.
|
newPage incomingLinks.
|
||||||
newPage options
|
newPage options
|
||||||
at: 'originalMetadata' put: self metadata;
|
at: 'originalMetadata' put: self metadata;
|
||||||
|
Loading…
Reference in New Issue
Block a user