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

don't trim empty text elements #33

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

Conversation

Pitasi
Copy link

@Pitasi Pitasi commented Sep 23, 2023

Hey there :)

I have a pipeline like

markdown -> [comrak] -> html
html -> [html-parser] -> nodes
nodes -> [my-logic] -> html
html

And, it took me a while to figure it out why my code blocks were broken! (Missing tabs, missing newlines, ...) 😅

Finally I realized that empty text blocks are not parsed by html-parsed, but they were not "empty", they were "whitespace only", which are still important inside <pre> so I don't think we should get rid of them this easily!

I tested this PR on my repos and it fixes my problem.

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