-
-
Notifications
You must be signed in to change notification settings - Fork 5
"break" nodes not handled and cause a TypeError exception #5
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
Labels
💪 phase/solved
Post is done
Comments
This comment has been minimized.
This comment has been minimized.
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? |
wooorm
pushed a commit
that referenced
this issue
May 4, 2021
Closes GH-5. Closes GH-6. Reviewed-by: Titus Wormer <[email protected]>
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: