Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with emphasized link text #457

Closed
jmooring opened this issue Jun 25, 2024 · 0 comments
Closed

Problem with emphasized link text #457

jmooring opened this issue Jun 25, 2024 · 0 comments

Comments

@jmooring
Copy link
Contributor

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
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())
}
@yuin yuin closed this as completed in 15ade8a Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant