Comparing version 1.6.0-0 to 1.6.0
@@ -10,9 +10,13 @@ function getAttribute(tag, attributeName, options) { | ||
const pattern = `${attributeName}\\="\([^"]*\)"`; | ||
if (debug) console.log("[xml-utils] pattern:", pattern); | ||
const quotechars = ['"', "'"]; | ||
for (let i = 0; i < quotechars.length; i++) { | ||
const char = quotechars[i]; | ||
const pattern = attributeName + "\\=" + char + "([^" + char + "]*)" + char; | ||
if (debug) console.log("[xml-utils] pattern:", pattern); | ||
const re = new RegExp(pattern); | ||
const match = re.exec(opening); | ||
if (debug) console.log("[xml-utils] match:", match); | ||
if (match) return match[1]; | ||
const re = new RegExp(pattern); | ||
const match = re.exec(opening); | ||
if (debug) console.log("[xml-utils] match:", match); | ||
if (match) return match[1]; | ||
} | ||
} | ||
@@ -19,0 +23,0 @@ |
{ | ||
"name": "xml-utils", | ||
"version": "1.6.0-0", | ||
"version": "1.6.0", | ||
"description": "Parse XML without Blowing Up Your Bundle Size", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20318
197
0