4.8Paragraphs

A sequence of non-blank lines that cannot be interpreted as other kinds of blocks forms a paragraph. The contents of the paragraph are the result of parsing the paragraph’s raw content as inlines. The paragraph’s raw content is formed by concatenating the lines and removing initial and final spaces or tabs.

A simple example with two paragraphs:

Example 219Try It
aaa

bbb
<p>aaa</p>
<p>bbb</p>

Paragraphs can contain multiple lines, but no blank lines:

Example 220Try It
aaa
bbb

ccc
ddd
<p>aaa
bbb</p>
<p>ccc
ddd</p>

Multiple blank lines between paragraphs have no effect:

Example 221Try It
aaa


bbb
<p>aaa</p>
<p>bbb</p>

Leading spaces or tabs are skipped:

Example 222Try It
  aaa
 bbb
<p>aaa
bbb</p>

Lines after the first may be indented any amount, since indented code blocks cannot interrupt paragraphs.

Example 223Try It
aaa
             bbb
                                       ccc
<p>aaa
bbb
ccc</p>

However, the first line may be preceded by up to three spaces of indentation. Four spaces of indentation is too many:

Example 224Try It
   aaa
bbb
<p>aaa
bbb</p>
Example 225Try It
    aaa
bbb
<pre><code>aaa
</code></pre>
<p>bbb</p>

Final spaces or tabs are stripped before inline parsing, so a paragraph that ends with two or more spaces will not end with a hard line break:

Example 226Try It
aaa     
bbb     
<p>aaa<br />
bbb</p>

4.9Blank lines

Blank lines between block-level elements are ignored, except for the role they play in determining whether a list is tight or loose.

Blank lines at the beginning and end of the document are also ignored.

Example 227Try It
  

aaa
  

# aaa

  
<p>aaa</p>
<h1>aaa</h1>