all repos — grayfriday @ d5a8df164b001f7f60e314b2d90aec3927b5819c

blackfriday fork with a few changes

Fix bug in isHtmlTag()

Fix what seems to be a typo. j should iterate through all tagname, so it
should be initialized to zero. The test exposes this bug.
Vytautas Ĺ altenis Vytautas.Shaltenis@gmail.com
Sat, 13 Apr 2013 22:21:47 +0300
commit

d5a8df164b001f7f60e314b2d90aec3927b5819c

parent

90509d39d42dcfcdad9e529c8a2745d3bbc2938b

2 files changed, 9 insertions(+), 1 deletions(-)

jump to
M html.gohtml.go

@@ -663,7 +663,7 @@ for i < len(tag) && isspace(tag[i]) {

i++ } - j := i + j := 0 for ; i < len(tag); i, j = i+1, j+1 { if j >= len(tagname) { break
M inline_test.goinline_test.go

@@ -63,6 +63,14 @@ }

} } +func TestRawHtmlTag(t *testing.T) { + tests := []string{ + "zz <style>p {}</style>\n", + "<p>zz p {}</p>\n", + } + doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE) +} + func TestEmphasis(t *testing.T) { var tests = []string{ "nothing inline\n",