Permalink
Browse files

Change Rule 14 for Emphasis.

Previously the nesting Strong (Emph (...)) was preferred
over Emph (Strong (...)).  This change makes Emph (Strong (...))
preferred.

Note that the commonmark reference implementations
were not entirely consistent about this rule, giving
different results for

    ***hi***

and

    ***hi****

This change simplifies parsing.  It goes against the majority
of implementations, but only on something utterly trivial.
1 parent 1ef46a7 commit 0e5e95eb7fcc973128d3a2a8cddf221f3825c156 @jgm committed Jan 7, 2017
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec.txt
View
@@ -5976,8 +5976,8 @@ the following principles resolve ambiguity:
an interpretation `<strong>...</strong>` is always preferred to
`<em><em>...</em></em>`.
-14. An interpretation `<strong><em>...</em></strong>` is always
- preferred to `<em><strong>..</strong></em>`.
+14. An interpretation `<em><strong>...</strong></em>` is always
+ preferred to `<strong><em>..</em></strong>`.
15. When two potential emphasis or strong emphasis spans overlap,
so that the second begins before the first ends and ends after
@@ -7000,14 +7000,14 @@ Rule 14:
```````````````````````````````` example
***foo***
.
-<p><strong><em>foo</em></strong></p>
+<p><em><strong>foo</strong></em></p>
````````````````````````````````
```````````````````````````````` example
_____foo_____
.
-<p><strong><strong><em>foo</em></strong></strong></p>
+<p><em><strong><strong>foo</strong></strong></em></p>
````````````````````````````````

0 comments on commit 0e5e95e

Please sign in to comment.