diff --git a/parser/attribute.go b/parser/attribute.go index 42b1753..f417d2b 100644 --- a/parser/attribute.go +++ b/parser/attribute.go @@ -2,6 +2,7 @@ package parser import ( "bytes" + "io" "strconv" "github.com/yuin/goldmark/text" @@ -227,7 +228,7 @@ func parseAttributeString(reader text.Reader) ([]byte, bool) { return nil, false } -func scanAttributeDecimal(reader text.Reader, w *bytes.Buffer) { +func scanAttributeDecimal(reader text.Reader, w io.ByteWriter) { for { c := reader.Peek() if util.IsNumeric(c) { diff --git a/parser/html_block.go b/parser/html_block.go index c796354..a1f3338 100644 --- a/parser/html_block.go +++ b/parser/html_block.go @@ -134,7 +134,7 @@ func (b *htmlBlockParser) Open(parent ast.Node, reader text.Reader, pc Context) isCloseTag := match[2] > -1 && bytes.Equal(line[match[2]:match[3]], []byte("/")) hasAttr := match[6] != match[7] tagName = strings.ToLower(string(line[match[4]:match[5]])) - _, ok := allowedBlockTags[strings.ToLower(string(tagName))] + _, ok := allowedBlockTags[tagName] if ok { node = ast.NewHTMLBlock(ast.HTMLBlockType6) } else if tagName != "script" && tagName != "style" && tagName != "pre" && !ast.IsParagraph(last) && !(isCloseTag && hasAttr) { // type 7 can not interrupt paragraph