diff --git a/src/MiniDocs/HedgeDoc.class.st b/src/MiniDocs/HedgeDoc.class.st index 2f03c29..c00666f 100644 --- a/src/MiniDocs/HedgeDoc.class.st +++ b/src/MiniDocs/HedgeDoc.class.st @@ -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;