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

continue processing ecmarkdown after comments #479

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Aug 30, 2022

When processing text nodes with ecmarkdown, we replace that single node with potentially multiple nodes output by ecmarkdown.

We do this while walking the tree, which is sketchy. To prevent re-running ecmarkdown on text nodes we just created, we keep track of the node which originally followed this text node and then skip those.

But the walker only sees text nodes and elements, so when the next node is a comment node, it just skipped the reset of the element. Fix is to keep track of the next non-comment node.

@bakkot bakkot merged commit e1cdab9 into main Aug 30, 2022
@bakkot bakkot deleted the emd-after-comments branch August 30, 2022 15:38
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.

2 participants