xml-parser
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -128,3 +128,3 @@ | ||
debug('attribute %j', xml); | ||
var m = match(/([\w:]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/); | ||
var m = match(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/); | ||
if (!m) return; | ||
@@ -131,0 +131,0 @@ return { name: m[1], value: strip(m[2]) } |
{ | ||
"name": "xml-parser", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"repository": "segmentio/xml-parser", | ||
@@ -5,0 +5,0 @@ "description": "the little xml parser that could", |
var parse = require('..'); | ||
var should = require('should'); | ||
@@ -190,1 +191,13 @@ it('should support blank strings', function(){ | ||
}) | ||
it('should support attributes with a hyphen', function () { | ||
var node = parse('<a data-bar="baz">foo</a>') | ||
node.root.should.eql({ | ||
name: "a", | ||
attributes: { | ||
"data-bar": "baz" | ||
}, | ||
children: [], | ||
content: "foo" | ||
}) | ||
}) |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22270
336
12
1