From 3ebb5ca4936c53e9f0af66706329ecc29acc05a7 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 31 Oct 2017 18:19:30 +0100 Subject: [PATCH] Fix issue in diffMarked creating text nodes for each character --- www/common/diffMarked.js | 2 ++ www/slide/inner.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index bf446fe37..3820f3125 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -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 = $('
', {id: id}).append(safe_newHtmlFixed); var Dom = domFromHTML($('
').append($div).html()); + $content[0].normalize(); var oldDom = domFromHTML($content[0].outerHTML); var patch = makeDiff(oldDom, Dom, id); if (typeof(patch) === 'string') { diff --git a/www/slide/inner.js b/www/slide/inner.js index 7c706ede2..d512d251e 100644 --- a/www/slide/inner.js +++ b/www/slide/inner.js @@ -402,7 +402,6 @@ define([ }); framework.setContentGetter(function () { - console.log(framework._.title.title); var content = CodeMirror.getContent(); Slide.update(content.content); return content;