Fix issue in diffMarked creating text nodes for each character

pull/1/head
yflory 7 years ago
parent 5438970ab4
commit 3ebb5ca493

@ -129,6 +129,7 @@ define([
var domFromHTML = function (html) {
var Dom = new DOMParser().parseFromString(html, "text/html");
Dom.normalize();
removeForbiddenTags(Dom.body);
removeListeners(Dom.body);
return Dom;
@ -179,6 +180,7 @@ define([
var $div = $('<div>', {id: id}).append(safe_newHtmlFixed);
var Dom = domFromHTML($('<div>').append($div).html());
$content[0].normalize();
var oldDom = domFromHTML($content[0].outerHTML);
var patch = makeDiff(oldDom, Dom, id);
if (typeof(patch) === 'string') {

@ -402,7 +402,6 @@ define([
});
framework.setContentGetter(function () {
console.log(framework._.title.title);
var content = CodeMirror.getContent();
Slide.update(content.content);
return content;

Loading…
Cancel
Save