-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Multi-paragraph list item nested in blockquote #304
Comments
Is this the same issue as commonmark/commonmark-spec#460 ? |
EDIT: At the 2nd glance, it's not same. In the referred issue the problem is that when nesting a two-item list inside a block quote, we actually get two one-item lists instead. Here we have one-item list where the item consists of two paragraphs and the parent blockquote breaks that one item into two separate blocks. In both cases parent container block should not change how we parse its contents. (And that's why I reported here, because imho spec is quite clear in this regard so I considered this just a bug in implementation.) If we agree on that, then on the implementation level they both may just be multiple manifestations of a single problem, and maybe they may be be different bugs in it. It can even differ in different implementations. So I don't know. |
I think the underlying problem has to do with whether a following space is included in the block quote start marker. Currently a following space is always gobbled, and that can lead to violations of the Principle of Uniformity when (a) the quoted content contains significant indentation, and (b) a space is not uniformly added after |
And yes, I believe it is a spec bug. Spec says:
A block quote marker
So in your example the block quote marker on line 1 is just
which is a list followed by a paragraph. Thus the implementations are giving you just what the spec says. |
I see. I missed the Indeed, if I change the input into
(i.e. spaces added after each Sorry for the noise. |
Fuzz target for finding quadratic performance issues
Input:
Expected output:
Actual output:
Rationale:
See https://spec.commonmark.org/0.29/#example-226. If I prepend every line of it with blockquote mark, it should be the same output, just wrapped in the blockquote, as per https://spec.commonmark.org/0.29/#block-quotes, the "basic case".
(Originally reported at pulldown-cmark/pulldown-cmark#358)
The text was updated successfully, but these errors were encountered: