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 1.0.3 to 1.1.0

31

dist/configs.js

@@ -303,6 +303,29 @@ "use strict";

} else if (blockType === 'code-block') {
return {
start: "<pre><code" + blockStyle + ">",
end: '</code></pre>'
};
var previousBlock = contentState.getBlockBefore(block.key);
var nextBlock = contentState.getBlockAfter(block.key);
var previousBlockType = previousBlock && previousBlock.getType();
var nextBlockType = nextBlock && nextBlock.getType();
if (previousBlockType === 'code-block' && nextBlockType === 'code-block') {
return {
start: "<code" + blockStyle + "><div>",
end: '</div></code>'
};
} else if (previousBlockType === 'code-block') {
return {
start: "<code" + blockStyle + "><div>",
end: '</div></code></pre>'
};
} else if (nextBlockType === 'code-block') {
return {
start: "<pre><code" + blockStyle + "><div>",
end: '</div></code>'
};
} else {
return {
start: "<pre><code" + blockStyle + "><div>",
end: '</div></code></pre>'
};
}
} else if (blocks[blockType]) {

@@ -309,0 +332,0 @@ return {

2

package.json
{
"name": "braft-convert",
"version": "1.0.3",
"version": "1.1.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

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