Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Hard line breaks are not respected #18

Closed
makew0rld opened this issue Jun 27, 2020 · 1 comment
Closed

Hard line breaks are not respected #18

makew0rld opened this issue Jun 27, 2020 · 1 comment
Labels
bug Something isn't working markdown Not following markdown spec

Comments

@makew0rld
Copy link
Owner

Reported by tiwesdaeg on IRC.

According to the markdown spec, lines with two spaces at the end should stay on their own line. They shouldn't be joined with a paragraph above, and shouldn't have blank lines inserted above them.

There are other ways to cause these "hard line breaks", and md2gemini should support all of them to stay in the Markdown spec. See https://spec.commonmark.org/0.29/#hard-line-breaks .

@makew0rld makew0rld added bug Something isn't working markdown Not following markdown spec labels Jun 27, 2020
@makew0rld makew0rld changed the title Lines with two spaces at the end are still joined into a paragraph Hard line breaks are not respected Jun 27, 2020
@makew0rld
Copy link
Owner Author

makew0rld commented Jun 27, 2020

The mistune v2 HTML renderer seems to respect this, meaning it needs to be fixed on my end.

Python 3.8.3 (default, May 17 2020, 18:15:42) 
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mistune
>>> mistune.__version__
'2.0.0a4'
>>> text = """
... line with two spaces  
... another line, regular
... regular line
... line with two spaces again  
... """
>>> mistune.html(text)
'<p>line with two spaces<br />\nanother line, regular\nregular line\nline with two spaces again</p>\n'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working markdown Not following markdown spec
Projects
None yet
Development

No branches or pull requests

1 participant