summaryrefslogtreecommitdiffstats
path: root/packages/markdown/marked/test/new/cm_blockquotes.md
blob: 6a80a6f32d6011facd39c3064ef6f8d029e2d1dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
### Example 191

> # Foo
> bar
> baz

### Example 192

The spaces after the `>` characters can be omitted:

># Bar
>bar
> baz

### Example 193

The `>` characters can be indented 1-3 spaces:

   > # Baz
   > bar
 > baz

### Example 194

Four spaces gives us a code block:

    > # Qux
    > bar
    > baz

### Example 195

The Laziness clause allows us to omit the `>` before paragraph continuation text:

> # Quux
> 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
    ```

    <blockquote>
    <pre><code></code></pre>
    </blockquote>
    <p>foo</p>
    <pre><code></code></pre>

### Example 201

    > foo
        - bar

    <blockquote>
    <p>foo
    - bar</p>
    </blockquote>

### 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 code