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
Backslash doesn't insert a br #421
Comments
Did you try passing It seems it’s passed down to remark-parse btw |
I suppose you mean like this? const result = await mdx(
`
# Hello, MDX
**Hello**\
I <3 Markdown and JSX
`,
{
commonmark: true,
},
) Same output when trying that |
Did some digging and I think this is the cause. Not sure how to solve it though |
That could be it! Or maybe because you use a slash in a template literal: console.log(`a\
b`)
//=> 'ab' |
Oh my bad, had no idea that backslash didn't work in template strings. Adding |
Subject of the issue
I've been using
\
for new lines in my markdown files and it worked great with rehype etc. Migrated to MDX and noticed it didn't work the same way. Not 100% sure if this is a standard way of inserting new lines or not.Your environment
@mdx-js/mdx
@0.18.1
v10.15.0
Steps to reproduce
Expected behaviour
Backslash (
\
) should be converted to a<br/>
elementActual behaviour
It's just omitted
The text was updated successfully, but these errors were encountered: