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

Regression: comments inside lists #287

Closed
kcarnold opened this issue Mar 11, 2022 · 2 comments
Closed

Regression: comments inside lists #287

kcarnold opened this issue Mar 11, 2022 · 2 comments

Comments

@kcarnold
Copy link

Crashing testcase:

- This is a list item <!-- Comment: an innocent-looking comment -->

I just submitted gohugoio/hugo#9658 but I suspect that this is related to #285.

@jmooring
Copy link
Contributor

jmooring commented Mar 11, 2022

Regression 1.4.8 -> 1.4.9

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())

}

Other failing examples:

a <!-- b -->
> a <!-- b -->
[a](b) <!-- c -->
![a](b) <!-- c -->
## a <!-- b -->

@polarweasel
Copy link

polarweasel commented Mar 11, 2022

Another failing example (anywhere in a table will do it):

| a <!-- b -->

@yuin yuin closed this as completed in e64a68f Mar 12, 2022
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

3 participants