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

Bare backslash rendered as backslash before heading #884

Closed
4 tasks done
martijnthe opened this issue Feb 3, 2025 · 4 comments
Closed
4 tasks done

Bare backslash rendered as backslash before heading #884

martijnthe opened this issue Feb 3, 2025 · 4 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@martijnthe
Copy link

Initial checklist

Affected package

[email protected]

Steps to reproduce

To repro, I used the demo page and added this at the top:

Test
\
\
# A demo of `react-markdown`

Actual behavior

In the screenshot below, you can see that the backslash before the heading is being rendered as a backslash and not as a line break.
I tried adding a newline after the backslash, but that also doesn't work-around the problem.
When I remove the heading (#) the backslash does get rendered as a line break.

Image

Expected behavior

Backslashes before a heading should also be rendered as a line break.

Runtime

No response

Package manager

No response

Operating system

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Feb 3, 2025
@wooorm
Copy link
Member

wooorm commented Feb 3, 2025

That is how markdown works.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2025
@wooorm wooorm added the 🤷 no/invalid This cannot be acted upon label Feb 3, 2025

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Feb 3, 2025
@martijnthe
Copy link
Author

@wooorm thanks for your quick reply.

Is there a way to avoid getting the last backslash before the heading rendered? I tried adding another line break but that also didn’t help.

@wooorm
Copy link
Member

wooorm commented Feb 4, 2025

Don’t: stick with markdown. It renders the same everywhere.

Things are this way, because HTML works that way: it is not semantic to use a br at the end of a paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants