@@ -58,6 +58,10 @@ The exact formatting behavior is implementation defined. This section attempts
58
58
to describe the rules but deviation may be either an inexpediency in the
59
59
implementation or an error in the description.
60
60
61
+ {self} does not attempt to recognize AsciiDoc, CommonMark, Markdown,
62
+ reStructuredText, or any other markup language. Formally, {self} recognizes
63
+ only plain text, and similarity to any markup language is incidental.
64
+
61
65
NOTE: Depending on your expectations of merge commit messages you may find
62
66
{self} unsuitable for use in such messages. If you write them precisely like
63
67
you write non-merge commit messages, go ahead and format them with {self}.
@@ -95,9 +99,9 @@ those cases and avoid them by preventing wrapping: it will
95
99
references both preserve their context and don't degenerate into _list
96
100
items_.
97
101
98
- _Block quotes_ are exempt from the requirement of surrounding blank lines and
99
- will never be considered to belong to a paragraph. A block quote embedded
100
- inside a paragraph has the same effect on that paragraph as an empty line has .
102
+ A paragraph may be interrupted by _block quotes_ and _fenced code blocks_,
103
+ meaning these are exempt from the requirement of surrounding blank lines and
104
+ will never be considered to belong to a paragraph.
101
105
102
106
=== Subject line
103
107
@@ -196,8 +200,64 @@ literals.
196
200
197
201
=== Literal
198
202
199
- A line starting with one tab or four spaces is considered a _literal_. Literals
200
- are printed verbatim, making them suitable for listings and tables.
203
+ A line starting with one tab or four spaces is considered a _literal_:
204
+
205
+ ----
206
+ paragraph
207
+
208
+ literal
209
+
210
+ paragraph
211
+ ----
212
+
213
+ Literals are printed verbatim, making them suitable for listings and tables.
214
+
215
+ See also _fenced code block_.
216
+
217
+ === Code fence
218
+
219
+ Outside of a _fenced code block_ a line starting with up to 3 spaces followed
220
+ by at least 3 consecutive backticks (*`*) is considered an _opening code
221
+ fence_:
222
+
223
+ ----
224
+ ```opening
225
+ ----
226
+
227
+ Within a fenced code block a line starting with up to 3 spaces followed by at
228
+ least as many consecutive backticks as the preceding opening code fence is
229
+ considered a _closing code fence_; any sequence of fewer backticks is ignored:
230
+
231
+ ----
232
+ ````opening
233
+ ```
234
+ `````
235
+ ----
236
+
237
+ NOTE: For sake of compatibility, tilde (*~*) cannot be used in place of
238
+ backtick.
239
+
240
+ === Fenced code block
241
+
242
+ A _fenced code block_ begins with an _opening code fence_ and ends with the
243
+ first following _closing code fence_:
244
+
245
+ ----
246
+ Compare the previous version of origin/topic with the current version:
247
+ ```sh
248
+ $ git range-diff origin/main origin/topic@{1} origin/topic
249
+ ```
250
+ ----
251
+
252
+ The fenced code block includes both code fences and all contents in-between the
253
+ code fences.
254
+
255
+ Fenced code blocks are printed verbatim, making them suitable for listings.
256
+ Fenced code blocks are more flexible in their use than _literals_ are but
257
+ otherwise solve the same problem.
258
+
259
+ A fenced code block may interrupt a _paragraph_; it needs no preceding or
260
+ following blank line.
201
261
202
262
=== Block quote
203
263
@@ -226,11 +286,9 @@ vip:!fmt -w72 -p'>'
226
286
----
227
287
====
228
288
229
- Unlike other constructs a block quote may be embedded inside a _paragraph_ with
230
- no preceding or following blank line; the block quote will not be folded into
231
- the paragraph and the paragraph will otherwise observe standard behavior. This
232
- enables a common pattern of immediately preceding the block quote with an
233
- author attribution, illustrated above.
289
+ A block quote may interrupt a _paragraph_; it needs no preceding or following
290
+ blank line. This enables a common pattern of immediately preceding the block
291
+ quote with an author attribution, illustrated above.
234
292
235
293
=== Comment
236
294
@@ -309,6 +367,11 @@ foo baar -- baz qux wupwupwup [1][2] [wup]
309
367
hex:
310
368
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
311
369
370
+ chicken:
371
+ ```chicken
372
+ chicken chicken
373
+ ```
374
+
312
375
- foo
313
376
1. foo bar
314
377
baz
@@ -332,6 +395,11 @@ wupwupwup [1][2] [wup]
332
395
hex:
333
396
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
334
397
398
+ chicken:
399
+ ```chicken
400
+ chicken chicken
401
+ ```
402
+
335
403
- foo
336
404
1. foo bar
337
405
baz
0 commit comments