Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix div being closed by raw block content#87

Merged
hellux merged 1 commit intohellux:masterfrom
bitfehler:raw-in-div
Feb 19, 2025
Merged

Fix div being closed by raw block content#87
hellux merged 1 commit intohellux:masterfrom
bitfehler:raw-in-div

Conversation

@bitfehler
Copy link
Contributor

Currently a div gets closed if it contains a raw block that in turn contains what could be the div's closing fence. This commit fixes that by keeping track of open code blocks when looking for the closing fence.

It also removes the existing test for this case from the skip file.

fixes #6

Currently a div gets closed if it contains a raw block that in turn
contains what could be the div's closing fence. This commit fixes that
by keeping track of open code blocks when looking for the closing fence.

It also removes the existing test for this case from the `skip` file.

fixes hellux#6
@bitfehler
Copy link
Contributor Author

Hey again 😉

I figured now that I had poked some of the code anyways, #6 might be some low-hanging fruit. I am however not completely satisfied with the result. I feel like the readability is not great, but I haven't really had a good idea yet on how to improve it. I considered various ways to break up existing match arms, but they'd all just end up doing pretty similar stuff. Maybe you have a better idea?

@hellux
Copy link
Owner

hellux commented Feb 19, 2025

This looks great, thanks!

@hellux hellux merged commit 695ae82 into hellux:master Feb 19, 2025
8 checks passed
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.

bug: ignore closing fence inside code blocks

2 participants