New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

convert-rich-text

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-rich-text - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

lib/doc.js

@@ -50,2 +50,4 @@ var dom = require('./dom');

this.line.appendChild(node);
// TODO: loop through in priority order

@@ -61,3 +63,2 @@ // TODO: each format function returns a promise

// TODO: optimize line?
this.line.appendChild(node);
};

@@ -64,0 +65,0 @@

{
"name": "convert-rich-text",
"version": "1.0.0",
"version": "1.0.1",
"description": "Convert an insert-only rich-text delta into HTML",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -87,4 +87,6 @@ # convert-rich-text

Each line of rich-text is wrapped with a block element (default <div>).
attribute-, class- and style-based formats wrap text with an inline element if there is no other tag to work on (default <span>).
Each line of rich-text is wrapped with a block element (default `<div>`).
attribute-, class- and style-based formats wrap text with an inline element if there is no other tag to work on (default `<span>`).
You can change these tags with the `blockTag` and `inlineTag` options:

@@ -91,0 +93,0 @@

@@ -11,10 +11,13 @@ var assert = require('chai').assert;

reverse: function(node) {
return document.createTextNode(node.textContent.split('').reverse().join(''));
var newNode = document.createTextNode(node.textContent.split('').reverse().join(''));
node.parentNode.replaceChild(newNode, node);
return newNode;
},
repeat: function(node, value) {
var wrapper = document.createDocumentFragment();
var frag = document.createDocumentFragment();
for (var i = 0, n = parseInt(value); i < n; i++) {
wrapper.appendChild(node.cloneNode(true));
frag.appendChild(node.cloneNode(true));
}
return wrapper;
node.parentNode.replaceChild(frag, node);
return frag;
}

@@ -21,0 +24,0 @@ };

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