htmltagparser
Advanced tools
Comparing version 0.0.6 to 0.0.8
@@ -25,3 +25,3 @@ // Generated by CoffeeScript 1.6.3 | ||
module.exports = main = function(str, strict) { | ||
module.exports = main = function(str, strict, lowercase) { | ||
var classes, id, t, tag; | ||
@@ -31,2 +31,5 @@ if (strict == null) { | ||
} | ||
if (lowercase == null) { | ||
lowercase = true; | ||
} | ||
if (typeof str !== 'string') { | ||
@@ -42,4 +45,6 @@ throw new ParseError('(undefined)'); | ||
tag = t.tag, id = t.id, classes = t.classes; | ||
tag = tag.toLowerCase(); | ||
if (strict && !valid_html_tags(tag)) { | ||
if (lowercase) { | ||
tag = tag.toLowerCase(); | ||
} | ||
if (strict && !valid_html_tags(tag.toLowerCase())) { | ||
throw new UnknownTagError(tag); | ||
@@ -46,0 +51,0 @@ } |
{ | ||
"name": "htmltagparser", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"description": "htmltagparser", | ||
@@ -5,0 +5,0 @@ "author": "Aldo Bucchi <aldo.bucchi@gmail.com>", |
5177
122