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

hard break at the end of a paragraph is not properly parsed #118

Closed
4 tasks done
tripodsan opened this issue Sep 6, 2022 · 3 comments
Closed
4 tasks done

hard break at the end of a paragraph is not properly parsed #118

tripodsan opened this issue Sep 6, 2022 · 3 comments
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on

Comments

@tripodsan
Copy link
Contributor

Initial checklist

Affected packages and versions

micormark

Link to runnable example

https://codesandbox.io/s/thirsty-fire-1jdcgn

Steps to reproduce

parse this:

# Trailing hard-break

This break is properly detected\
yes?

But a trailing break is not\



What's worse, it leaves a stray `\`

checking the github behaviour, it's the same :-( but of course this is rather unfortunate and is difficult to find a workaround.

Expected behavior

<h1>Trailing hard-break</h1>
<p>This break is properly detected<br />
yes?</p>
<p>But a trailing break is not<br /></p>
<p>What's worse, it leaves a stray <code>\</code></p>

Actual behavior

<h1>Trailing hard-break</h1>
<p>This break is properly detected<br />
yes?</p>
<p>But a trailing break is not\</p>
<p>What's worse, it leaves a stray <code>\</code></p>

Runtime

Node v14

Package manager

npm v7

OS

macOS

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 labels Sep 6, 2022
@wooorm
Copy link
Member

wooorm commented Sep 6, 2022

That’s how markdown works: CommonMark, and as you found out, GFM.
The original markdown, and basically all markdown parsers, work the same.
It stems from HTML also seeing it as invalid: hard breaks are semantic breaks in prose. Not breaks at ends of paragraphs.
Given that this project follows CommonMark, this is not an issue in this project.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2022
@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Sep 6, 2022
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually labels Sep 6, 2022
@tripodsan
Copy link
Contributor Author

ok. fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants