braft-convert
Advanced tools
Comparing version 2.1.14 to 2.3.0
@@ -176,6 +176,5 @@ "use strict"; | ||
var spreadNodeAttributes = function spreadNodeAttributes(attributesObject) { | ||
attributesObject = attributesObject || {}; | ||
return Object.keys(attributesObject).reduce(function (attributeString, attributeName) { | ||
return attributeString + " " + attributeName + "=\"" + attributesObject[attributeName] + "\""; | ||
}, ' ').replace(/^\s$/, ''); | ||
}, '').replace(/^\s$/, ''); | ||
}; | ||
@@ -346,5 +345,5 @@ | ||
if (entityType === 'link') { | ||
var _entity$data$nodeAttr = entity.data.nodeAttributes, | ||
className = _entity$data$nodeAttr.class, | ||
nodeAttrAsProps = _objectWithoutProperties(_entity$data$nodeAttr, ["class"]); | ||
var _ref = entity.data.nodeAttributes || {}, | ||
className = _ref.class, | ||
nodeAttrAsProps = _objectWithoutProperties(_ref, ["class"]); | ||
@@ -416,3 +415,4 @@ nodeAttrAsProps.className = className; | ||
textIndent = _block$data2.textIndent, | ||
nodeAttributes = _block$data2.nodeAttributes; | ||
_block$data2$nodeAttr = _block$data2.nodeAttributes, | ||
nodeAttributes = _block$data2$nodeAttr === undefined ? {} : _block$data2$nodeAttr; | ||
@@ -449,3 +449,3 @@ var attributeString = spreadNodeAttributes(nodeAttributes); | ||
if (previousBlockType !== 'code-block') { | ||
start = "<pre " + attributeString + "><code>"; | ||
start = "<pre" + attributeString + "><code>"; | ||
} else { | ||
@@ -452,0 +452,0 @@ start = ''; |
{ | ||
"name": "braft-convert", | ||
"version": "2.1.14", | ||
"version": "2.3.0", | ||
"description": "A convert helper for Braft Editor.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
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
72264