mjml-core
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -218,3 +218,3 @@ 'use strict'; | ||
if (rawXML) { | ||
return children.map(function (child) { | ||
return childrens.map(function (child) { | ||
return (0, _jsonToXML2.default)(child); | ||
@@ -221,0 +221,0 @@ }).join('\n'); |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var _keys = require("babel-runtime/core-js/object/keys"); | ||
var _keys = require('babel-runtime/core-js/object/keys'); | ||
@@ -20,11 +20,11 @@ var _keys2 = _interopRequireDefault(_keys); | ||
var subNode = children && children.length > 0 ? children.map(jsonToXML).join("\n") : content ? content : ''; | ||
var subNode = children && children.length > 0 ? children.map(jsonToXML).join('\n') : content ? content : ''; | ||
var stringAttrs = (0, _keys2.default)(attributes).map(function (attr) { | ||
return attr + "=\"" + attributes[attr] + "\""; | ||
}).join(" "); | ||
return attr + '="' + attributes[attr] + '"'; | ||
}).join(' '); | ||
return "<" + tagName + (stringAttrs === '' ? '>' : " " + stringAttrs + ">") + subNode + "</" + tagName + ">"; | ||
return '<' + tagName + (stringAttrs === '' ? '>' : ' ' + stringAttrs + '>') + subNode + '</' + tagName + '>'; | ||
}; | ||
module.exports = exports["default"]; | ||
module.exports = exports['default']; |
@@ -85,6 +85,2 @@ 'use strict'; | ||
var _traverseMJML = require('./helpers/traverseMJML'); | ||
var _traverseMJML2 = _interopRequireDefault(_traverseMJML); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -189,8 +185,4 @@ | ||
var mjBody = (0, _traverseMJML2.default)(mjml, function (child) { | ||
return child.tagName === 'mj-body'; | ||
}); | ||
var mjHead = (0, _traverseMJML2.default)(mjml, function (child) { | ||
return child.tagName === 'mj-head'; | ||
}); | ||
var mjBody = (0, _lodash.find)(mjml.children, { tagName: 'mj-body' }); | ||
var mjHead = (0, _lodash.find)(mjml.children, { tagName: 'mj-head' }); | ||
@@ -221,2 +213,3 @@ var _processing = function _processing(node, context) { | ||
}; | ||
var applyAttributes = function applyAttributes(mjml) { | ||
@@ -239,3 +232,3 @@ var parse = function parse(mjml) { | ||
return (0, _extends3.default)({}, mjml, { | ||
attributes: (0, _extends3.default)({}, globalDatas.defaultAttributes[tagName], globalDatas.defaultAttributes['mj-all'], attributesClasses, defaultAttributesForClasses, (0, _lodash.omit)(attributes, ['mj-class'])), | ||
attributes: (0, _extends3.default)({}, globalDatas.defaultAttributes['mj-all'], globalDatas.defaultAttributes[tagName], attributesClasses, defaultAttributesForClasses, (0, _lodash.omit)(attributes, ['mj-class'])), | ||
children: (0, _lodash.map)(children, function (mjml) { | ||
@@ -242,0 +235,0 @@ return parse(mjml, nextParentMjClass); |
{ | ||
"name": "mjml-core", | ||
"description": "mjml-core", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"main": "lib/index.js", | ||
@@ -24,6 +24,6 @@ "repository": { | ||
"lodash": "^4.17.3", | ||
"mjml-migrate": "^4.0.0", | ||
"mjml-parser-xml": "^4.0.0-beta.2", | ||
"mjml-validator": "^4.0.0" | ||
"mjml-migrate": "^4.0.1", | ||
"mjml-parser-xml": "^4.0.1", | ||
"mjml-validator": "^4.0.1" | ||
} | ||
} |
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
127789
2178
Updatedmjml-migrate@^4.0.1
Updatedmjml-parser-xml@^4.0.1
Updatedmjml-validator@^4.0.1