xml-parser-xo
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -71,3 +71,3 @@ export class ParsingError extends Error { | ||
function element(matchRoot) { | ||
const m = match(/^<([\w-:.\u00C0-\u00FF]+)\s*/); | ||
const m = match(/^<([^?!</>\s]+)\s*/); | ||
if (!m) | ||
@@ -174,7 +174,7 @@ return; | ||
function attribute() { | ||
const m = match(/([\w-:.\u00C0-\u00FF]+)\s*=\s*("[^"]*"|'[^']*'|[\w\u00C0-\u00FF]+)\s*/); | ||
const m = match(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/); | ||
if (m) { | ||
return { | ||
name: m[1], | ||
value: stripQuotes(m[2]) | ||
name: m[1].trim(), | ||
value: stripQuotes(m[2].trim()) | ||
}; | ||
@@ -181,0 +181,0 @@ } |
@@ -75,3 +75,3 @@ "use strict"; | ||
function element(matchRoot) { | ||
const m = match(/^<([\w-:.\u00C0-\u00FF]+)\s*/); | ||
const m = match(/^<([^?!</>\s]+)\s*/); | ||
if (!m) | ||
@@ -178,7 +178,7 @@ return; | ||
function attribute() { | ||
const m = match(/([\w-:.\u00C0-\u00FF]+)\s*=\s*("[^"]*"|'[^']*'|[\w\u00C0-\u00FF]+)\s*/); | ||
const m = match(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/); | ||
if (m) { | ||
return { | ||
name: m[1], | ||
value: stripQuotes(m[2]) | ||
name: m[1].trim(), | ||
value: stripQuotes(m[2].trim()) | ||
}; | ||
@@ -185,0 +185,0 @@ } |
{ | ||
"name": "xml-parser-xo", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"repository": "github:chrisbottin/xml-parser", | ||
@@ -5,0 +5,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20268