Sign In

Post #1087558

Parent topic
Replies get included in the quote layout
Date created
2-Jul-2017, 6:50 PM

yhwx said:


A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line — a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a <br /> tag.

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

Yes, this takes a tad more effort to create a <br />, but a simplistic “every line break is a <br />” rule wouldn’t work for Markdown. Markdown’s email-style blockquoting and multi-paragraph list items work best — and look better — when you format them with hard breaks.

This doesn’t align with our implementation. Inserting a hard line break does create a <br> tag in the HTML, because asking users to end a line with two spaces to insert a break isn’t intuitive at all; it’s a simple config option in the parser we use. However, a single line break doesn’t start a new paragraph, therefore the first line following the quote is included in the last paragraph within the quote. This is also unintuitive in my opinion, but that’s what the parser does (and what other implementations do from what I’ve seen).

You should probably avoid Gruber’s definition of Markdown. It’s outdated and some of his rules don’t apply any more.

To the top