yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

Regression 1.4.7 -> 1.4.8 (html.WithUnsafe) #285

Closed jmooring closed 2 years ago

jmooring commented 2 years ago

markdown

a <!-- b --> c

expected

<p>a <!-- b --> c</p

actual

<p>a &lt;!-- b --&gt; c</p>
test.go ```go package main import ( "bytes" "fmt" "github.com/yuin/goldmark" "github.com/yuin/goldmark/renderer/html" ) func main() { md := goldmark.New( goldmark.WithRendererOptions( html.WithUnsafe(), ), ) input := `a c` var buf bytes.Buffer if err := md.Convert([]byte(input), &buf); err != nil { panic(err) } fmt.Println(buf.String()) } ```

CommonMark dingus

jmooring commented 2 years ago

@yuin Thank you for the quick fix. Much appreciated!