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

Problem with emphasized link text #457

Closed jmooring closed 4 months ago

jmooring commented 4 months ago

Tested with v1.7.3

Input:

[*[a]*](b)

Expected output: https://spec.commonmark.org/dingus/?text=%5B*%5Ba%5D*%5D(b)

<p><a href="b"><em>[a]</em></a></p>

Actual output:

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