From 254dbd680e092e40240b7b247ddab4081c5a18ad Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Wed, 10 Dec 2025 12:24:25 +0100 Subject: fix(markdown): linebreak not replaced by space when line starts with modifier --- markdown/ast_paragraph.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'markdown') 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 { -- cgit v1.2.3