Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

braft-convert

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braft-convert - npm Package Compare versions

Comparing version 2.1.7 to 2.1.9

55

dist/configs.js

@@ -252,3 +252,2 @@ "use strict";

var _entity$getData = entity.getData(),
src = _entity$getData.src,
url = _entity$getData.url,

@@ -281,3 +280,3 @@ link = _entity$getData.link,

{ style: { display: 'inline-block' }, href: link, target: link_target },
_react2.default.createElement("img", _extends({}, meta, { src: src || url, width: width, height: height, style: { width: width, height: height } }))
_react2.default.createElement("img", _extends({}, meta, { src: url, width: width, height: height, style: { width: width, height: height } }))
)

@@ -289,3 +288,3 @@ );

{ className: "media-wrap image-wrap" + styledClassName, style: imageWrapStyle },
_react2.default.createElement("img", _extends({}, meta, { src: src || url, width: width, height: height, style: { width: width, height: height } }))
_react2.default.createElement("img", _extends({}, meta, { src: url, width: width, height: height, style: { width: width, height: height } }))
);

@@ -297,3 +296,3 @@ }

{ className: "media-wrap audio-wrap" },
_react2.default.createElement("audio", _extends({ controls: true }, meta, { src: src || url }))
_react2.default.createElement("audio", _extends({ controls: true }, meta, { src: url }))
);

@@ -304,3 +303,3 @@ } else if (mediaType === 'video') {

{ className: "media-wrap video-wrap" },
_react2.default.createElement("video", _extends({ controls: true }, meta, { src: src || url, width: width, height: height }))
_react2.default.createElement("video", _extends({ controls: true }, meta, { src: url, width: width, height: height }))
);

@@ -311,3 +310,3 @@ } else if (mediaType === 'embed') {

{ className: "media-wrap embed-wrap" },
_react2.default.createElement("div", { dangerouslySetInnerHTML: { __html: src || url } })
_react2.default.createElement("div", { dangerouslySetInnerHTML: { __html: url } })
);

@@ -429,34 +428,18 @@ } else if (mediaType === 'hr') {

if (previousBlockType !== 'code-block' && nextBlockType === 'code-block') {
return {
start: '<pre><code>',
end: '</code>'
};
}
var start = '';
var end = '';
if (previousBlockType === 'code-block' && nextBlockType !== 'code-block') {
return {
start: '<code>',
end: '</code></pre>'
};
}
if (previousBlockType !== 'code-block') {
return {
start: '<pre><code>',
end: '</code></pre>'
};
start = '<pre><code>';
} else {
start = '';
}
if (nextBlockType !== 'code-block') {
return {
start: '<pre><code>',
end: '</code></pre>'
};
end = '</code></pre>';
} else {
end = '<br/>';
}
return {
start: '<code>',
end: '</code>'
};
return { start: start, end: end };
} else if (blocks[blockType]) {

@@ -569,5 +552,5 @@ return {

} else if (nodeName === 'audio') {
return createEntity('AUDIO', 'IMMUTABLE', { src: node.getAttribute('src'), meta: meta });
return createEntity('AUDIO', 'IMMUTABLE', { url: node.getAttribute('src'), meta: meta });
} else if (nodeName === 'video') {
return createEntity('VIDEO', 'IMMUTABLE', { src: node.getAttribute('src'), meta: meta });
return createEntity('VIDEO', 'IMMUTABLE', { url: node.getAttribute('src'), meta: meta });
} else if (nodeName === 'img') {

@@ -582,3 +565,3 @@

entityData.src = node.getAttribute('src');
entityData.url = node.getAttribute('src');
width && (entityData.width = width);

@@ -601,3 +584,3 @@ height && (entityData.height = height);

return createEntity('EMBED', 'IMMUTABLE', {
src: embedContent
url: embedContent
});

@@ -647,3 +630,3 @@ }

node.innerHTML = node.innerHTML.replace(/<\/code><code(.*?)>/g, '<br/>').replace(/<code(.*?)>/g, '').replace(/<\/code>/g, '');
node.innerHTML = node.innerHTML.replace(/<code(.*?)>/g, '').replace(/<\/code>/g, '');

@@ -650,0 +633,0 @@ return {

{
"name": "braft-convert",
"version": "2.1.7",
"version": "2.1.9",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc