diff options
Diffstat (limited to 'mardown/ast_paragraph.go')
| -rw-r--r-- | mardown/ast_paragraph.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mardown/ast_paragraph.go b/mardown/ast_paragraph.go index 687e735..5961370 100644 --- a/mardown/ast_paragraph.go +++ b/mardown/ast_paragraph.go @@ -50,8 +50,13 @@ func paragraph(lxs *lexers, oneLine bool) (*astParagraph, error) { } tree.content = append(tree.content, astLiteral(lxs.Current().Value)) case lexerLiteral, lexerHeader: + s := lxs.Current().Value + // replace line break by space + if n > 0 { + s = " " + s + } n = 0 - tree.content = append(tree.content, astLiteral(lxs.Current().Value)) + tree.content = append(tree.content, astLiteral(s)) case lexerModifier: n = 0 mod, err := modifier(lxs) |
