Remove restrictive limitation on inline comments#713
Conversation
* This limitation is not imposed by block comments * This limitation is not imposed by HTML * This limitation is not expected to be depended on by authors Closes commonmarkGH-712.
to accord with commonmark/commonmark-spec#713.
|
Question: If this is really what the HTML5 spec says, why do validators reject |
|
Hmm, if linters see it that way, it seems my statement that this wasn’t a parse error (#712 (comment)) is incorrect. |
|
I see. So, it will be treated as a comment by browsers, even though it isn't a comment. |
This part I disagree with. The spec clearly says it is a comment, but that “parse errors” mean that parsers can warn about it. In my case, it makes parsing simpler, particularly the |
|
OK. We can stick with this, then. |
|
I can’t imagine this being a problem for someone, and I really prefer the consistency with both types of inline/block HTML. But I believe we agree that if this is causing problems, it can be reverted! |
0.30.3 * Fix quadratic complexity bug with repeated `![[]()`. Resolves CVE-2023-22486. Add new pathological test. * Allow declarations with no space, as per spec. * Set `enumi*` counter correctly in LaTeX output. * Allow `<!DOCTYPE` to be case-insensitive. (This conforms to the existing spec.) * Fixed HTML comment scanning. Need to handle this case: `<!--> and -->`. Since the scanner finds the longest match, we had to move some of the logic outside of the scanner. * Fix quadratic parsing issue with repeated `<!--` (this was not introduced by the previous fix, and not in a released version of cmark). Resolves CVE-2023-22484. Add new pathological test. * Update HTML comment scanner to accord with commonmark/commonmark-spec#713. * Pathological tests: half the number of repetitions, and the timeout. This reduces the time needed for the pathological tests. * Shrink `struct cmark_node`. The `internal_offset` member is only used for headings and can be moved to `struct cmark_heading`. This reduces the size of `struct cmark_node` from 112 to 104 bytes on 64-bit systems. * Add `-Wstrict-prototypes` and fix offending functions. * Fix quadratic behavior involving `get_containing_block`. Instead of searching for the containing block, update the tight list status when entering a child of a list item or exiting a list. * Fix `pathological_tests.py`: - Use a multiprocessing.Queue to actually get results from spawned tests processes. - Fix the `allowed_failures` test. - Truncate actual output when printed. - Prepare for testing pathological behavior of the Commonmark renderer. * Fix source position bug with backticks (kyle).
Changelog:
===========
* Fix quadratic complexity bug with repeated '![[]()'.
Resolves CVE-2023-22486. Add new pathological test.
* Allow declarations with no space, as per spec
* Set 'enumi*' counter correctly in LaTeX output
* Allow '<!DOCTYPE' to be case-insensitive.
existing spec.)
* Fixed HTML comment scanning. Need to handle this case: '<!--> and -->'.
Since the scanner finds the longest match, we had to
move some of the logic outside of the scanner.
* Fix quadratic parsing issue with repeated '<!--' (this was not
introduced by the previous fix, and not in a released version of cmark).
Resolves CVE-2023-22484. Add new pathological test.
* Update HTML comment scanner to accord with commonmark/commonmark-spec#713
* Pathological tests: half the number of repetitions, and the timeout.
This reduces the time needed for the pathological tests.
* Shrink 'struct cmark_node' (openembedded#446). The 'internal_offset' member is
only used for headings and can be moved to 'struct cmark_heading'.
This reduces the size of 'struct cmark_node' from 112 to 104 bytes on
64-bit systems.
* Add '-Wstrict-prototypes' and fix offending functions.
* Fix quadratic behavior involving 'get_containing_block' (openembedded#431).
Instead of searching for the containing block, update the tight list
status when entering a child of a list item or exiting a list.
* Fix 'pathological_tests.py'
- Use a multiprocessing.Queue to actually get results from spawned
tests processes.
- Fix the 'allowed_failures' test.
- Truncate actual output when printed.
- Prepare for testing pathological behavior of the Commonmark renderer.
* Fix source position bug with backticks
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
to accord with commonmark/commonmark-spec#713.
Source: meta-openembedded MR: 297304 Type: Integration Disposition: Merged from meta-openembedded ChangeID: eb8dfb2 Description: Changelog: =========== * Fix quadratic complexity bug with repeated '![[]()'. Resolves CVE-2023-22486. Add new pathological test. * Allow declarations with no space, as per spec * Set 'enumi*' counter correctly in LaTeX output * Allow '<!DOCTYPE' to be case-insensitive. existing spec.) * Fixed HTML comment scanning. Need to handle this case: '<!--> and -->'. Since the scanner finds the longest match, we had to move some of the logic outside of the scanner. * Fix quadratic parsing issue with repeated '<!--' (this was not introduced by the previous fix, and not in a released version of cmark). Resolves CVE-2023-22484. Add new pathological test. * Update HTML comment scanner to accord with commonmark/commonmark-spec#713 * Pathological tests: half the number of repetitions, and the timeout. This reduces the time needed for the pathological tests. * Shrink 'struct cmark_node' (openembedded#446). The 'internal_offset' member is only used for headings and can be moved to 'struct cmark_heading'. This reduces the size of 'struct cmark_node' from 112 to 104 bytes on 64-bit systems. * Add '-Wstrict-prototypes' and fix offending functions. * Fix quadratic behavior involving 'get_containing_block' (openembedded#431). Instead of searching for the containing block, update the tight list status when entering a child of a list item or exiting a list. * Fix 'pathological_tests.py' - Use a multiprocessing.Queue to actually get results from spawned tests processes. - Fix the 'allowed_failures' test. - Truncate actual output when printed. - Prepare for testing pathological behavior of the Commonmark renderer. * Fix source position bug with backticks Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 69aea3d) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
to accord with commonmark/commonmark-spec#713.
Closes GH-712.