diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-01-08 00:19:50 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-08 00:19:50 +0100 |
commit | 0e5e95eb7fcc973128d3a2a8cddf221f3825c156 (patch) | |
tree | c2a8dc35701e8e6001375a0ffc66aecd9aaa3cc3 | |
parent | 1ef46a73e61968a60cc7b2e700381d719165b86c (diff) |
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.
-rw-r--r-- | spec.txt | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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> ```````````````````````````````` |