all repos — grayfriday @ 4b668b875bf5c66786c197b63f51698953258b13

blackfriday fork with a few changes

Merge pull request #205 from russross/issue-156

Fix bug parsing emphasis
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 19 Oct 2015 09:08:30 +0300
commit

4b668b875bf5c66786c197b63f51698953258b13

parent

82a3b626299e06e21a99dae5514594e7b0bcf563

2 files changed, 8 insertions(+), 2 deletions(-)

jump to
M inline.goinline.go

@@ -910,7 +910,7 @@ }

// look for the next emph char, skipping other constructs func helperFindEmphChar(data []byte, c byte) int { - i := 1 + i := 0 for i < len(data) { for i < len(data) && data[i] != c && data[i] != '`' && data[i] != '[' {
M inline_test.goinline_test.go

@@ -266,6 +266,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) }

@@ -294,7 +300,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) }