all repos — grayfriday @ 82a3b626299e06e21a99dae5514594e7b0bcf563

blackfriday fork with a few changes

Merge pull request #208 from russross/issue-18

Fix escaping asterisks within emphasis
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 19 Oct 2015 09:05:52 +0300
commit

82a3b626299e06e21a99dae5514594e7b0bcf563

parent

1d673b3cd9cc47e45ced0b25a9aa191dbf8cfbd8

2 files changed, 6 insertions(+), 4 deletions(-)

jump to
M inline.goinline.go

@@ -919,14 +919,13 @@ }

if i >= len(data) { return 0 } - if data[i] == c { - return i - } - // do not count escaped chars if i != 0 && data[i-1] == '\\' { i++ continue + } + if data[i] == c { + return i } if data[i] == '`' {
M inline_test.goinline_test.go

@@ -153,6 +153,9 @@ "<p>odd <em>number\nof</em> markers_ here</p>\n",

"mix of *markers_\n", "<p>mix of *markers_</p>\n", + + "*What is A\\* algorithm?*\n", + "<p><em>What is A* algorithm?</em></p>\n", } doTestsInline(t, tests) }