HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

Empty line in markdown cell? #1011

Closed gandalfsaxe closed 6 years ago

gandalfsaxe commented 6 years ago

What is the syntax for have an empty line / newline in markdown mode? Sometime it's nice with a little extra space between some things.

zeewinpeng commented 6 years ago
one line
two line<br><br>
three line

Renders to:

one line two line

three line

gandalfsaxe commented 6 years ago

Thanks.

Isn’t there a markdown implementation of this? Do we really have to resort to HTML for this?

keeprock commented 6 years ago

@GandalfSaxe Markdown compile html just fine. I'm used to implement entire html pages inside markdown cell. Use <br> - no need for specific "Markdown" implementation.

gandalfsaxe commented 6 years ago

Why not? Markdown was invented so we didn’t have to deal with tags and messy syntax when doing basic text markup. Why is blank lines not as simple as having either simply blank lines or a number of spaces / tabs as the only content on a line?

keeprock commented 6 years ago

@GandalfSaxe Sooo, you are questioning that at a programmer notebook issue thread? :) There is no better place to argue on Markdown specs.

gandalfsaxe commented 6 years ago

I'm merely assuming there are conventional syntax for empty lines in some flavors of Markdown, but of course I could be wrong. Perhaps it's not a universally needed thing :) I did discover that simply making a new cell shows as extra spacing, so that could be a way around it.

ylian commented 6 years ago

I intend to stay as close to Markdown specs (particularly CommonMark and GFM) as much as possible.

There are ways in Markdown to create a new line. By default Quiver turns on GFM linebreaks, so a \n in Markdown creates a new line (but multiple \ns are treated as a single one per Markdown specs). You can turn this off in settings, and then you need to add two spaces at the end of a line to create a new line.

An empty line in Markdown means creating a new paragraph.

I am not aware of a standard Markdown syntax that creates an empty line, so if that's what you need, use <br> as others have suggested.

gandalfsaxe commented 6 years ago

Perfect. Adhering to some standard (CommonMark/GFM) is really important, and I can see now there are good enough options to do this. I also think my need for empty lines will actually be minimal, and when I do need some extra space, making a new cell is a fine solution for that.