From b79e720a36b6805be26938b176bb44cdabaace5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vytautas=20=C5=A0altenis?= Date: Sat, 13 Apr 2013 22:34:37 +0300 Subject: [PATCH] Make isHtmlTag() case insensitive --- html.go | 2 +- inline_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/html.go b/html.go index a685ae5..cf176cc 100644 --- a/html.go +++ b/html.go @@ -664,7 +664,7 @@ func isHtmlTag(tag []byte, tagname string) bool { break } - if tag[i] != tagname[j] { + if strings.ToLower(string(tag[i]))[0] != tagname[j] { return false } } diff --git a/inline_test.go b/inline_test.go index fbc0eaa..0403339 100644 --- a/inline_test.go +++ b/inline_test.go @@ -67,6 +67,9 @@ func TestRawHtmlTag(t *testing.T) { tests := []string{ "zz \n", "

zz p {}

\n", + + "zz \n", + "

zz p {}

\n", } doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE) }