Closed Gusted closed 1 year ago
<img>
import ( "bytes" "fmt" "github.com/yuin/goldmark" "github.com/yuin/goldmark/renderer/html" ) func main() { md := goldmark.New( goldmark.WithRendererOptions( html.WithUnsafe(), ), ) var buf bytes.Buffer if err := md.Convert([]byte("<img src=./.assets/logo.svg\n/>"), &buf); err != nil { panic(err) } fmt.Println(buf.String()) }
<p><img src=./.assets/logo.svg /></p>
<p><img src=./.assets/logo.svg /></p>
<img>
with the closing tag on a new line.