@@ -6273,29 +6273,31 @@ The following rules define emphasis and strong emphasis:
6273
6273
`_`-delimited emphasis or `__`-delimited strong emphasis, unless it
6274
6274
is backslash-escaped.
6275
6275
6276
- Where rules 1--12 above are compatible with multiple parsings,
6276
+ 13. Implementers can emit `<i>` and `<b>` instead of `<em>` and `<strong>`.
6277
+
6278
+ Where rules 1--13 above are compatible with multiple parsings,
6277
6279
the following principles resolve ambiguity:
6278
6280
6279
- 13 . The number of nestings should be minimized. Thus, for example,
6281
+ 14 . The number of nestings should be minimized. Thus, for example,
6280
6282
an interpretation `<strong>...</strong>` is always preferred to
6281
6283
`<em><em>...</em></em>`.
6282
6284
6283
- 14 . An interpretation `<em><strong>...</strong></em>` is always
6285
+ 15 . An interpretation `<em><strong>...</strong></em>` is always
6284
6286
preferred to `<strong><em>...</em></strong>`.
6285
6287
6286
- 15 . When two potential emphasis or strong emphasis spans overlap,
6288
+ 16 . When two potential emphasis or strong emphasis spans overlap,
6287
6289
so that the second begins before the first ends and ends after
6288
6290
the first ends, the first takes precedence. Thus, for example,
6289
6291
`*foo _bar* baz_` is parsed as `<em>foo _bar</em> baz_` rather
6290
6292
than `*foo <em>bar* baz</em>`.
6291
6293
6292
- 16 . When there are two potential emphasis or strong emphasis spans
6294
+ 17 . When there are two potential emphasis or strong emphasis spans
6293
6295
with the same closing delimiter, the shorter one (the one that
6294
6296
opens later) takes precedence. Thus, for example,
6295
6297
`**foo **bar baz**` is parsed as `**foo <strong>bar baz</strong>`
6296
6298
rather than `<strong>foo **bar baz</strong>`.
6297
6299
6298
- 17 . Inline code spans, links, images, and HTML tags group more tightly
6300
+ 18 . Inline code spans, links, images, and HTML tags group more tightly
6299
6301
than emphasis. So, when there is a choice between an interpretation
6300
6302
that contains one of these elements and one that does not, the
6301
6303
former always wins. Thus, for example, `*[foo*](bar)` is
@@ -7269,7 +7271,7 @@ _foo____
7269
7271
````````````````````````````````
7270
7272
7271
7273
7272
- Rule 13 implies that if you want emphasis nested directly inside
7274
+ Rule 14 implies that if you want emphasis nested directly inside
7273
7275
emphasis, you must use different delimiters:
7274
7276
7275
7277
```````````````````````````````` example
@@ -7318,7 +7320,7 @@ ____foo____
7318
7320
7319
7321
7320
7322
7321
- Rule 13 can be applied to arbitrarily long sequences of
7323
+ Rule 14 can be applied to arbitrarily long sequences of
7322
7324
delimiters:
7323
7325
7324
7326
```````````````````````````````` example
@@ -7328,7 +7330,7 @@ delimiters:
7328
7330
````````````````````````````````
7329
7331
7330
7332
7331
- Rule 14 :
7333
+ Rule 15 :
7332
7334
7333
7335
```````````````````````````````` example
7334
7336
***foo***
@@ -7344,7 +7346,7 @@ _____foo_____
7344
7346
````````````````````````````````
7345
7347
7346
7348
7347
- Rule 15 :
7349
+ Rule 16 :
7348
7350
7349
7351
```````````````````````````````` example
7350
7352
*foo _bar* baz_
@@ -7360,7 +7362,7 @@ Rule 15:
7360
7362
````````````````````````````````
7361
7363
7362
7364
7363
- Rule 16 :
7365
+ Rule 17 :
7364
7366
7365
7367
```````````````````````````````` example
7366
7368
**foo **bar baz**
@@ -7376,7 +7378,7 @@ Rule 16:
7376
7378
````````````````````````````````
7377
7379
7378
7380
7379
- Rule 17 :
7381
+ Rule 18 :
7380
7382
7381
7383
```````````````````````````````` example
7382
7384
*[bar*](/url)
0 commit comments