I am trying to port some documentation from RST to Markdown and can’t figure how to make a line break without creating a new paragraph. As an example see this RST based doc and compare to the markdown version created with Documenter. I know I can introduce a paragraph (and so far it’s my only choice) but shouldn’t it be possible to do line breaks in Julia’s Markdown? I tried inserting two spaces before the line break like I see in web docs, but no effect. In fact, even I try in REPL I can not do it as well
My REPL example was an attempt to show a very simple to reproduce example. When you say wouldn’t really work in the current Julia setup as trailing white-space is not allowed you mean the REPL only or in .md files too?
As I mentined, I was not able to make it work in .md files processed with Documenter.jl but I can see it work in the Julia manual here
so I’m confused.
What I meant is that the test-suite of Julia itself currently fails when there is trailing white-space. Of course this could be changed, but people seem reasonably fond of it.
CommonMark spec says line break from ending with two spaces then a new line.
Propergating new Markdown varients causes sufferring.
Let’s not, not use the CommonMark spec.
A line break (not in a code span or HTML tag) that is preceded by two or more spaces and does not occur at the end of a block is parsed as a hard line break (rendered in HTML as a tag):
CommonMark (your link) mentions that a slash can be used for hard line breaks:
For a more visible alternative, a backslash before the line ending may be used instead of two spaces
Maybe this \ should be added under the ‘the following markdown syntax is supported in Julia’ chapter in the manual? And mention that .. , i.e. 2+ spaces, are not supported (if the reasonable trailing white-space behavior stays as is).