convert-rich-text
Advanced tools
Comparing version
@@ -79,5 +79,4 @@ var dom = module.exports = function(node) { | ||
dom.prototype.moveChildren = function(newNode) { | ||
var children = this.node.childNodes; | ||
for (var i = 0; i < children.length; i++) { | ||
newNode.appendChild(children[i]); | ||
while (this.node.firstChild) { | ||
newNode.appendChild(this.node.firstChild); | ||
} | ||
@@ -84,0 +83,0 @@ return this; |
{ | ||
"name": "convert-rich-text", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Convert an insert-only rich-text delta into HTML", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -83,2 +83,13 @@ var assert = require('chai').assert; | ||
{ | ||
desc: 'Link inside list', | ||
delta: { ops: [ | ||
{insert: 'Some text '}, | ||
{insert: 'a link', attributes: {link: 'http://vox.com'}}, | ||
{insert: ' more text'}, | ||
{insert: '\n', attributes: {list: true}} | ||
]}, | ||
expected: | ||
'<ol><li>Some text <a href="http://vox.com">a link</a> more text</li></ol>' | ||
}, | ||
{ | ||
desc: 'Custom', | ||
@@ -85,0 +96,0 @@ delta: { ops: [ |
25871
1.14%499
2.04%