xml-parser-xo
Advanced tools
Comparing version 3.1.0 to 3.1.1
24
index.js
@@ -156,12 +156,16 @@ /** | ||
function cdata() { | ||
const m = match(/^<!\[CDATA\[[^\]\]>]*]]>/); | ||
if (m) { | ||
const node = { | ||
type: 'CDATA', | ||
content: m[0] | ||
}; | ||
return { | ||
excluded: options.filter(node) === false, | ||
node | ||
}; | ||
if (xml.startsWith('<![CDATA[')) { | ||
const endPositionStart = xml.indexOf(']]>'); | ||
if (endPositionStart > -1) { | ||
const endPositionFinish = endPositionStart + 3; | ||
const node = { | ||
type: 'CDATA', | ||
content: xml.substring(0, endPositionFinish) | ||
}; | ||
xml = xml.slice(endPositionFinish); | ||
return { | ||
excluded: options.filter(node) === false, | ||
node | ||
}; | ||
} | ||
} | ||
@@ -168,0 +172,0 @@ } |
{ | ||
"name": "xml-parser-xo", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"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
9254
206