Fix nested code fence parsing in lists - #103
Conversation
The {0,3} indent tolerance can't match fences inside list items, which
are indented by the list marker width (4 spaces for Turndown's numbered
lists). Capture the opener's indentation instead and require the closer
at the same indent plus CommonMark's 0-3 slack, so deeper-indented
literal fences inside a block can't close it early.
Also extend the test fixture past the 10-segment comparison threshold
(9 segments auto-pass regardless of the markdown), and revert the
unrelated package-lock.json changes.
|
Hey Nate - thanks for the PR, it's good to see your name and avatar pop up 😁 Good catch on the bug here, and your fixture reproduced the right scenario, but I've pushed a follow-up commit to your branch (edc0662) that adjusts two things:
I also reverted the I appreciate you taking the time to make the PR, and it's cool that you're using |
I noticed that YAML code fences in lists don't get proper parsing. Here's a fix.
The test uses a truncated version of the actual file where I noticed the problem in my employer's docs.