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

[BUG] marked.parse() deathloops on invalid markdown since 15.0.1 #3559

Open
endlacer opened this issue Dec 12, 2024 · 1 comment · May be fixed by #3560
Open

[BUG] marked.parse() deathloops on invalid markdown since 15.0.1 #3559

endlacer opened this issue Dec 12, 2024 · 1 comment · May be fixed by #3560

Comments

@endlacer
Copy link

Marked version:
15.0.1

Description
When parsing this markdown:

XXXX

- - - - - - - - - - - - - - - - - - - - - - - - -
xxxx

Marked crashes when parsing markdown containing multiple hyphens as a horizontal rule pattern since version 15.0.1 (worked in 15.0.0) when the <hr> feature is deactivated.

Steps to reproduce:

  1. Visit https://stackblitz.com/edit/waxomj3x?file=src%2Fmain.ts
  2. Click "translate"
  3. Browser enters an infinite loop in the hr-tokenizer function
@UziTech UziTech linked a pull request Dec 12, 2024 that will close this issue
5 tasks
@UziTech
Copy link
Member

UziTech commented Dec 12, 2024

Looks like the list tokenizer is what is looping forever because it tries to skip a list item that looks like an hr. Should be fixed in #3560

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

Successfully merging a pull request may close this issue.

2 participants