8000 Fix HTML comment blocks in list items (issue #1144) by mihir0k · Pull Request #1146 · markdown-it/markdown-it · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@mihir0k
Copy link
@mihir0k mihir0k commented Jan 20, 2026

Summary

Details

The HTML block parser currently ends when it sees an outdented line. Inside list items, blank lines can be outdented but still belong to the list item, which causes <!-- ... --> blocks to end before -->. This change allows empty lines to remain inside HTML blocks when parsing list items, matching CommonMark’s type 2 rules.

Testing

  • npm test
  • npm run benchmark-deps
  • ./benchmark/benchmark.mjs

Allow outdented empty lines to remain inside HTML blocks when parsing list items, and add a regression fixture for issue markdown-it#1144.
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

0