Skip to content

Commit

Permalink
allow attribute with a hyphen
Browse files Browse the repository at this point in the history
  • Loading branch information
tnguyen14 committed Sep 29, 2014
1 parent 854034f commit f5ed542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function parse(xml) {

function attribute() {
debug('attribute %j', xml);
var m = match(/([\w:]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);
var m = match(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);
if (!m) return;
return { name: m[1], value: strip(m[2]) }
}
Expand Down

0 comments on commit f5ed542

Please sign in to comment.