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

Limit the depth of nested lists #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinbackhouse
Copy link

This replaces #471 which didn't work correctly. It is a rebase of github#323

nwellnhof added a commit to nwellnhof/cmark that referenced this pull request Jan 12, 2024
If we find consecutive blank lines inside a list item, abort early in
check_open_blocks by returning NULL. This makes S_process_line skip the
calls to open_new_blocks and add_text_to_container. open_new_blocks is a
no-op for blank lines. add_text_to_container would add an empty line
only for code and HTML blocks which we account for in check_open_blocks.

Fixes part of GHSA-66g8-4hjf-77xh. Obsoletes commonmark#475.
nwellnhof added a commit to nwellnhof/cmark that referenced this pull request Jan 15, 2024
If we find consecutive blank lines inside a list item, abort early in
check_open_blocks by returning NULL. This makes S_process_line skip the
calls to open_new_blocks and add_text_to_container. open_new_blocks is a
no-op for blank lines. add_text_to_container would add an empty line
only for code and HTML blocks which we account for in check_open_blocks.

Fixes part of GHSA-66g8-4hjf-77xh. Obsoletes commonmark#475.
jgm pushed a commit that referenced this pull request Jan 15, 2024
If we find consecutive blank lines inside a list item, abort early in
check_open_blocks by returning NULL. This makes S_process_line skip the
calls to open_new_blocks and add_text_to_container. open_new_blocks is a
no-op for blank lines. add_text_to_container would add an empty line
only for code and HTML blocks which we account for in check_open_blocks.

Fixes part of GHSA-66g8-4hjf-77xh. Obsoletes #475.
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 this pull request may close these issues.

1 participant