Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I wrap a multi-line quote in GFM?

Markdown has this great feature to wrap a bunch of quote between three backticks (```) to open the wrap and another three to close it. The content between those can span several lines and even include blank lines. Everything will be preserved.

Is there an equivalent for the quote that doesn't require me to add > in front of every line I want to wrap?

Something like >>> to start the wrap quote and >>> to close it again?

like image 490
orschiro Avatar asked Feb 06 '18 12:02

orschiro


People also ask

How do you write multiple lines in markdown?

Multiple Lines To create a distinct block of text without formatting any of the text within the block, place triple backticks (```) on the lines before and after the block of text to be separated.

How do you do a block quote in markdown?

To create a blockquote, start a line with greater than > followed by an optional space. Blockquotes can be nested, and can also contain other formatting. To keep the quote together, blank lines inside the quote must contain the > character.

What GitHub flavored markdown is and how it is used?

GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown that is currently supported for user content on GitHub.com and GitHub Enterprise. This formal specification, based on the CommonMark Spec, defines the syntax and semantics of this dialect. GFM is a strict superset of CommonMark.


2 Answers

There is no way to do that in pure Markdown, nor in GFM.

If you use line breaks instead of paragraphs, you only need one >:

> Lorem[space][space] ipsum[space][space] dolor sit amet 

Result:

Lorem
ipsum
dolor sit amet

like image 52
Tamás Sengel Avatar answered Oct 06 '22 00:10

Tamás Sengel


If you're using kramdown, you can use break <br> or multiple <br><br> break tag. As you know, the break tag inserts a single line break.

Lorem<br>ipsum<br><br>dolor sit amet

Result:

Lorem
ipsum

dolor sit amet

like image 23
Umut D. Avatar answered Oct 05 '22 22:10

Umut D.