Skip to content

Commit 6a254f5

Browse files
committed
Allow implementers to emit i and b
Issue commonmark#652.
1 parent 414c3e1 commit 6a254f5

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

spec.txt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6273,29 +6273,31 @@ The following rules define emphasis and strong emphasis:
62736273
`_`-delimited emphasis or `__`-delimited strong emphasis, unless it
62746274
is backslash-escaped.
62756275

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,
62776279
the following principles resolve ambiguity:
62786280

6279-
13. The number of nestings should be minimized. Thus, for example,
6281+
14. The number of nestings should be minimized. Thus, for example,
62806282
an interpretation `<strong>...</strong>` is always preferred to
62816283
`<em><em>...</em></em>`.
62826284

6283-
14. An interpretation `<em><strong>...</strong></em>` is always
6285+
15. An interpretation `<em><strong>...</strong></em>` is always
62846286
preferred to `<strong><em>...</em></strong>`.
62856287

6286-
15. When two potential emphasis or strong emphasis spans overlap,
6288+
16. When two potential emphasis or strong emphasis spans overlap,
62876289
so that the second begins before the first ends and ends after
62886290
the first ends, the first takes precedence. Thus, for example,
62896291
`*foo _bar* baz_` is parsed as `<em>foo _bar</em> baz_` rather
62906292
than `*foo <em>bar* baz</em>`.
62916293

6292-
16. When there are two potential emphasis or strong emphasis spans
6294+
17. When there are two potential emphasis or strong emphasis spans
62936295
with the same closing delimiter, the shorter one (the one that
62946296
opens later) takes precedence. Thus, for example,
62956297
`**foo **bar baz**` is parsed as `**foo <strong>bar baz</strong>`
62966298
rather than `<strong>foo **bar baz</strong>`.
62976299

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
62996301
than emphasis. So, when there is a choice between an interpretation
63006302
that contains one of these elements and one that does not, the
63016303
former always wins. Thus, for example, `*[foo*](bar)` is
@@ -7269,7 +7271,7 @@ _foo____
72697271
````````````````````````````````
72707272

72717273

7272-
Rule 13 implies that if you want emphasis nested directly inside
7274+
Rule 14 implies that if you want emphasis nested directly inside
72737275
emphasis, you must use different delimiters:
72747276

72757277
```````````````````````````````` example
@@ -7318,7 +7320,7 @@ ____foo____
73187320

73197321

73207322

7321-
Rule 13 can be applied to arbitrarily long sequences of
7323+
Rule 14 can be applied to arbitrarily long sequences of
73227324
delimiters:
73237325

73247326
```````````````````````````````` example
@@ -7328,7 +7330,7 @@ delimiters:
73287330
````````````````````````````````
73297331

73307332

7331-
Rule 14:
7333+
Rule 15:
73327334

73337335
```````````````````````````````` example
73347336
***foo***
@@ -7344,7 +7346,7 @@ _____foo_____
73447346
````````````````````````````````
73457347

73467348

7347-
Rule 15:
7349+
Rule 16:
73487350

73497351
```````````````````````````````` example
73507352
*foo _bar* baz_
@@ -7360,7 +7362,7 @@ Rule 15:
73607362
````````````````````````````````
73617363

73627364

7363-
Rule 16:
7365+
Rule 17:
73647366

73657367
```````````````````````````````` example
73667368
**foo **bar baz**
@@ -7376,7 +7378,7 @@ Rule 16:
73767378
````````````````````````````````
73777379

73787380

7379-
Rule 17:
7381+
Rule 18:
73807382

73817383
```````````````````````````````` example
73827384
*[bar*](/url)

0 commit comments

Comments
 (0)