-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Parsing * * * * * * … takes quadratic time #2
Comments
Note that the newline is suppressed at the end of line, so this gets parsed as a very deeply nested list item. One could also test with something like
|
Timings for cmark:
So cmark also shows quadratic behavior for this; the same issue could be reported there. |
There doesn't seem to be any backtracking in the parsing algorithm. |
I suspect it has to do with the |
There are two problems. Problem 1 is the use of Problem 2 is that we repeatedly scan for thematic breaks, even after it should be clear that this is unnecessary (since on the first scan, we see that the |
We're finalizing the most deeply nested list first, then on up the line. |
Problem 1 solved. Problem 2 remains. |
This is to store positions in a line where we know a scanner will fail. The immediate application is to #2.
The text was updated successfully, but these errors were encountered: