mjml-parser-xml
Advanced tools
Comparing version 4.0.5 to 4.1.0-beta.1
@@ -15,3 +15,3 @@ 'use strict'; | ||
var regexTag = function regexTag(tag) { | ||
return new RegExp('<' + tag + '([^>/]*)>([^]*?)</' + tag + '>', 'gmi'); | ||
return new RegExp('<' + tag + '((?: (?:(?:"[^"]*?")*(?:\'[^\']*?\')*[^/>\'"]*?)*?)|)>([^]*?)</' + tag + '>', 'gmi'); | ||
}; | ||
@@ -18,0 +18,0 @@ var replaceTag = function replaceTag(tag) { |
@@ -33,6 +33,2 @@ 'use strict'; | ||
var _mapValues = require('lodash/mapValues'); | ||
var _mapValues2 = _interopRequireDefault(_mapValues); | ||
var _path = require('path'); | ||
@@ -58,6 +54,2 @@ | ||
var _parseAttributes = require('./helpers/parseAttributes'); | ||
var _parseAttributes2 = _interopRequireDefault(_parseAttributes); | ||
var _cleanNode = require('./helpers/cleanNode'); | ||
@@ -104,3 +96,5 @@ | ||
_options$filePath = options.filePath, | ||
filePath = _options$filePath === undefined ? '.' : _options$filePath; | ||
filePath = _options$filePath === undefined ? '.' : _options$filePath, | ||
_options$ignoreInclud = options.ignoreIncludes, | ||
ignoreIncludes = _options$ignoreInclud === undefined ? false : _options$ignoreInclud; | ||
@@ -118,3 +112,2 @@ | ||
safeXml = (0, _parseAttributes2.default)(safeXml); | ||
safeXml = (0, _addCDATASection2.default)(CDATASections, safeXml); | ||
@@ -215,3 +208,3 @@ | ||
if (name === 'mj-include') { | ||
if (name === 'mj-include' && !ignoreIncludes) { | ||
inInclude = true; | ||
@@ -226,6 +219,2 @@ return handleInclude(decodeURIComponent(attrs.path), line); | ||
attrs = (0, _mapValues2.default)(attrs, function (val) { | ||
return decodeURIComponent(val); | ||
}); | ||
var newNode = { | ||
@@ -265,3 +254,3 @@ file: filePath, | ||
if (val) { | ||
cur.content = (0, _parseAttributes.decodeAttributes)(val); | ||
cur.content = val; | ||
} | ||
@@ -281,3 +270,5 @@ }, | ||
}, { | ||
xmlMode: true | ||
recognizeCDATA: true, | ||
decodeEntities: false, | ||
recognizeSelfClosing: true | ||
}); | ||
@@ -284,0 +275,0 @@ |
{ | ||
"name": "mjml-parser-xml", | ||
"description": "mjml-parser-xml", | ||
"version": "4.0.5", | ||
"version": "4.1.0-beta.1", | ||
"main": "lib/index.js", | ||
@@ -17,3 +17,4 @@ "repository": { | ||
"clean": "cross-env ../../node_modules/.bin/rimraf lib", | ||
"build": "cross-env ../../node_modules/.bin/babel src --out-dir lib" | ||
"build": "cross-env ../../node_modules/.bin/babel src --out-dir lib", | ||
"test": "node ./test/test.js" | ||
}, | ||
@@ -24,3 +25,8 @@ "dependencies": { | ||
"lodash": "^4.17.2" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.1.1", | ||
"mjml": "^4.1.0-beta.1", | ||
"mjml-core": "^4.1.0-beta.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
19440
3
322
1