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

Fix nested blockquote error #1495

Closed
wants to merge 6 commits into from
Closed

Fix nested blockquote error #1495

wants to merge 6 commits into from

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Jun 4, 2019

Marked version: master

Description

Error thrown when nesting blockquote

Contributor

  • Test(s) exist to ensure functionality and minimize regression

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

@UziTech UziTech changed the title Nested blockquote Fix nested blockquote error Jun 4, 2019
@UziTech UziTech requested review from styfle and joshbruce June 4, 2019 04:35
@UziTech
Copy link
Member Author

UziTech commented Jun 4, 2019

I added more tests and fixed a few other bugs in #1464

lib/marked.js Outdated Show resolved Hide resolved
@UziTech
Copy link
Member Author

UziTech commented Jun 5, 2019

I'm actually thinking we should just revert #1464

#1464 and this PR fixes recursion limit for fully nested blockquotes

>> a
>> b

but it doesn't solve recursion for partially nested blockquotes

> a
>> b

I'm not sure that we should have a special case for fully nested blockquotes.

markdown-it solves this problem by limiting the recursion to 100 nested blockquotes, and I'm not sure how commonmark.js gets around this.

@styfle
Copy link
Member

styfle commented Jun 5, 2019

markdown-it solves this problem by limiting the recursion to 100 nested blockquotes

That sounds pretty reasonable to me. I can't think of many scenarios where you would need that many nested blockquotes besides an email thread.

@UziTech UziTech closed this Jun 5, 2019
@UziTech UziTech deleted the nested-blockquote branch July 1, 2019 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught TypeError: Cannot parse >a\n>>b
2 participants