From 911780dcca8ebc91526d9a34b3220551662e8a9e Mon Sep 17 00:00:00 2001
From: Federico Soave hello hello
+[2]: hello foo
bar
+[5]: foo
bar hello world
- how are you
- how are you
-
@@ -24,5 +25,6 @@
diff --git a/test/new/def_blocks.md b/test/new/def_blocks.md
index 4d16292987..f58fa4d37b 100644
--- a/test/new/def_blocks.md
+++ b/test/new/def_blocks.md
@@ -17,5 +17,5 @@
> foo
> bar
-[1]: foo
+[5]: foo
> bar
From aece9b27329b728ea81ec96b4e7d1a227c6b0ab0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=A2=D1=80=D0=B5=D1=82?=
=?UTF-8?q?=D1=8F=D0=BA?=
hello world
-how are you
+paragraph before code
+text inside block code
-hello world
+paragraph before hr
hello world
+paragraph before head with hash
hello world
+paragraph before head with equals
hello world
-+how are you
paragraph before blockquote
+-text for blockquote
hello world
-paragraph before list
+hello world
-paragraph before div
+hello world -how are you
+paragraph with span +text inside span
hello world
diff --git a/test/new/toplevel_paragraphs.md b/test/new/toplevel_paragraphs.md index 2c17c669bf..de29be7557 100644 --- a/test/new/toplevel_paragraphs.md +++ b/test/new/toplevel_paragraphs.md @@ -2,35 +2,35 @@ gfm: true --- hello world - how are you - how are you + text after spaces + text after spaces -hello world +paragraph before code ``` -how are you +text inside block code ``` -hello world +paragraph before hr * * * -hello world +paragraph before head with hash # how are you -hello world +paragraph before head with equals how are you =========== -hello world -> how are you +paragraph before blockquote +> text for blockquote -hello world -* how are you +paragraph before list +* text inside list -hello world -++ +Foo
+bar +baz
+
The spaces after the >
characters can be omitted:
++ +Foo
+bar +baz
+
The >
characters can be indented 1-3 spaces:
++ +Foo
+bar +baz
+
Four spaces gives us a code block:
+ +> # Foo
+> bar
+> baz
+
+
+The Laziness clause allows us to omit the >
before paragraph continuation text:
++ +Foo
+bar +baz
+
A block quote can contain some lazy and some non-lazy continuation lines:
+ +++ +bar +baz +foo
+
Laziness only applies to lines that would have been continuations of paragraphs had they been prepended with block quote markers. For example, the >
cannot be omitted in the second line of
++foo
+
without changing the meaning.
+ +Similarly, if we omit the `>` in the second line then the block quote ends after the first line:
+
+> - foo
+- bar
+
+For the same reason, we can’t omit the >
in front of subsequent lines of an indented or fenced code block:
+++foo +
bar
+
+
+> ```
+foo
+```
+
+<blockquote>
+<pre><code></code></pre>
+</blockquote>
+<p>foo</p>
+<pre><code></code></pre>
+
+
+> foo
+ - bar
+
+<blockquote>
+<p>foo
+- bar</p>
+</blockquote>
+
+
+A block quote can be empty:
+ +++ +
++ +
A block quote can have initial or final blank lines:
+ +++ + +foo
+
A blank line always separates block quotes:
+ +++foo
+
++ +bar
+
Consecutiveness means that if we put these block quotes together, we get a single block quote:
+ +++ +foo +bar
+
To get a block quote with two paragraphs, use:
+ +++ +foo
+bar
+
Block quotes can interrupt paragraphs:
+ +foo
+++ +bar
+
In general, blank lines are not needed before or after block quotes:
+ +++aaa
+
++ +bbb
+
However, because of laziness, a blank line is needed between a block quote and a following paragraph:
+ +++ +bar +baz
+
++bar
+
baz
+ +++bar
+
baz
+ +It is a consequence of the Laziness rule that any number of initial >
s may be omitted on a continuation line of a nested block quote:
++ +++++foo +bar
+
++ +++++foo +bar +baz
+
When including an indented code block in a block quote, remember that the block quote marker includes both the >
and a following space. So five spaces are needed after the >
:
+++code +
+diff --git a/test/new/cm_blockquotes.md b/test/new/cm_blockquotes.md new file mode 100644 index 0000000000..95a317de44 --- /dev/null +++ b/test/new/cm_blockquotes.md @@ -0,0 +1,189 @@ +### Example 191 + +> # Foo +> bar +> baz + +### Example 192 + +The spaces after the `>` characters can be omitted: + +># Foo +>bar +> baz + +### Example 193 + +The `>` characters can be indented 1-3 spaces: + + > # Foo + > bar + > baz + +### Example 194 + +Four spaces gives us a code block: + + > # Foo + > bar + > baz + +### Example 195 + +The Laziness clause allows us to omit the `>` before paragraph continuation text: + +> # Foo +> bar +baz + +### Example 196 + +A block quote can contain some lazy and some non-lazy continuation lines: + +> bar +baz +> foo + +### Example 197 + +Laziness only applies to lines that would have been continuations of paragraphs had they been prepended with block quote markers. For example, the `>` cannot be omitted in the second line of + +> foo +--- + +without changing the meaning. + +### Example 198 + + Similarly, if we omit the `>` in the second line then the block quote ends after the first line: + + > - foo + - bar + +### Example 199 + +For the same reason, we can’t omit the `>` in front of subsequent lines of an indented or fenced code block: + +> foo + + bar + +### Example 200 + + > ``` + foo + ``` + +not code
+
+++
foo
+
+
+### Example 201
+
+ > foo
+ - bar
+
+ ++ +### Example 202 + +A block quote can be empty: + +> + +### Example 203 + +> +> +> + +### Example 204 + +A block quote can have initial or final blank lines: + +> +> foo +> + +### Example 205 + +A blank line always separates block quotes: + +> foo + +> bar + +### Example 206 + +Consecutiveness means that if we put these block quotes together, we get a single block quote: + +> foo +> bar + +### Example 207 + +To get a block quote with two paragraphs, use: + +> foo +> +> bar + +### Example 208 + +Block quotes can interrupt paragraphs: + +foo +> bar + +### Example 209 + +In general, blank lines are not needed before or after block quotes: + +> aaa +*** +> bbb + +### Example 210 + +However, because of laziness, a blank line is needed between a block quote and a following paragraph: + +> bar +baz + +### Example 211 + +> bar + +baz + +### Example 212 + +> bar +> +baz + +### Example 213 + +It is a consequence of the Laziness rule that any number of initial `>`s may be omitted on a continuation line of a nested block quote: + +> > > foo +bar + +### Example 214 + +>>> foo +> bar +>>baz + +### Example 215 + +When including an indented code block in a block quote, remember that the block quote marker includes both the `>` and a following space. So five spaces are needed after the `>`: + +> code + +> not codefoo + - bar
+