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
"break" nodes not handled and cause a TypeError exception #5
Labels
💪 phase/solved
Post is done
Comments
This comment has been minimized.
This comment has been minimized.
github-actions
bot
added
🤞 phase/open
Post is being triaged manually
and removed
👋 phase/new
Post is being triaged automatically
labels
May 3, 2021
Hmm, might this be better suited for |
Oh, I wasn't sure which part of the pipeline was responsible for this. I'm happy with whatever place you think is the best for the fix. |
Can you try mdast-util-to-string and see if that works for your use case? |
github-actions
bot
added
🤷 no/invalid
This cannot be acted upon
👎 phase/no
Post cannot or will not be acted on
and removed
🤞 phase/open
Post is being triaged manually
labels
May 4, 2021
wooorm
added
💪 phase/solved
Post is done
and removed
👎 phase/no
Post cannot or will not be acted on
🤷 no/invalid
This cannot be acted upon
labels
May 4, 2021
4 tasks
Released! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial checklist
Affected packages and versions: nlcst-to-string >=2.0.4 (at least, maybe older too)
Steps to reproduce
If there are trailing whitespaces at the end of a line, it seems to get parsed as
type: break
in Markdown, whichnlcst-to-string
doesn't know how to convert to string.Link to code example: https://codesandbox.io/s/remark-debug-forked-hh0ub?file=/src/index.js
Example AST subtree containing
break
s:Expected behavior
No crash or exception thrown in the JS engine. The stringification should complete and
break
nodes should be considered empty string.Actual behavior
Uncaught JS exception:
The text was updated successfully, but these errors were encountered: