diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-10 12:24:25 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-10 12:24:25 +0100 |
| commit | 254dbd680e092e40240b7b247ddab4081c5a18ad (patch) | |
| tree | 75dd0cabab7f9888d29c3002b2fe7494a8363f33 /markdown | |
| parent | 707121c88e2a97d3bfceaba850dcdda79c0f4f37 (diff) | |
fix(markdown): linebreak not replaced by space when line starts with modifier
Diffstat (limited to 'markdown')
| -rw-r--r-- | markdown/ast_paragraph.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/markdown/ast_paragraph.go b/markdown/ast_paragraph.go index 197c7e3..7e865c5 100644 --- a/markdown/ast_paragraph.go +++ b/markdown/ast_paragraph.go @@ -58,6 +58,10 @@ func paragraph(lxs *lexers, oneLine bool) (*astParagraph, *ParseError) { n = 0 tree.content = append(tree.content, astLiteral(s)) case lexerModifier: + // replace line break by space + if n > 0 { + tree.content = append(tree.content, astLiteral(" ")) + } n = 0 mod, err := modifier(lxs) if err != nil { |
