aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_paragraph.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-10 12:24:25 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-10 12:24:25 +0100
commit254dbd680e092e40240b7b247ddab4081c5a18ad (patch)
tree75dd0cabab7f9888d29c3002b2fe7494a8363f33 /markdown/ast_paragraph.go
parent707121c88e2a97d3bfceaba850dcdda79c0f4f37 (diff)
fix(markdown): linebreak not replaced by space when line starts with modifier
Diffstat (limited to 'markdown/ast_paragraph.go')
-rw-r--r--markdown/ast_paragraph.go4
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 {