Fix bug parsing emphasis Start searching for emphasis character at 0th index instead of 1st. Fixes a corner case with doubly emphasised code span followed by another code span on the same line. Changes interpretation of improperly nested emphasis, hence the change in TestEmphasisMix(). Closes #156.
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 12 Oct 2015 21:06:27 +0300
2 files changed,
8 insertions(+),
2 deletions(-)
M
inline_test.go
→
inline_test.go
@@ -263,6 +263,12 @@ "<p>odd <strong>number\nof</strong> markers__ here</p>\n",
"mix of **markers__\n", "<p>mix of **markers__</p>\n", + + "**`/usr`** : this folder is named `usr`\n", + "<p><strong><code>/usr</code></strong> : this folder is named <code>usr</code></p>\n", + + "**`/usr`** :\n\n this folder is named `usr`\n", + "<p><strong><code>/usr</code></strong> :</p>\n\n<p>this folder is named <code>usr</code></p>\n", } doTestsInline(t, tests) }@@ -291,7 +297,7 @@ "**improper *nesting** is* bad\n",
"<p><strong>improper *nesting</strong> is* bad</p>\n", "*improper **nesting* is** bad\n", - "<p><em>improper **nesting</em> is** bad</p>\n", + "<p>*improper <strong>nesting* is</strong> bad</p>\n", } doTestsInline(t, tests) }