A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: Fix render comments with line breaks
Luffyb31d644b92f0
diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.goindex 082a198a..5dbab9fc 100644--- a/pkg/converter/markdown.go+++ b/pkg/converter/markdown.go@@ -65,7 +65,7 @@ func Markdown2HTML(source string) string {return html}-// Markdown2BasicHTML convert markdown to html ,Only basic syntax can be used+// Markdown2BasicHTML convert markdown to html, Only basic syntax can be usedfunc Markdown2BasicHTML(source string) string {content := Markdown2HTML(source)filter := bluemonday.NewPolicy()@@ -124,7 +124,7 @@ func (r *DangerousHTMLRenderer) renderHTMLBlock(w util.BufWriter, source []byte,l := n.Lines().Len()for i := 0; i < l; i++ {line := n.Lines().At(i)- r.Writer.SecureWrite(w, r.Filter.SanitizeBytes(line.Value(source)))+ r.Writer.SecureWrite(w, line.Value(source))}} else {if n.HasClosure() {