From 5679dd9feeb58274249f92db044c4b6d03898de8 Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 8 Aug 2019 16:34:26 +0200 Subject: [PATCH] Clean code --- www/common/diffMarked.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index 5c4942dbc..1b7f21e2b 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -63,8 +63,6 @@ define([ }; DiffMd.render = function (md, sanitize, restrictedMd) { - console.error("DIFFMD RENDER", restrictedMd); - console.log("md:\n", md); Marked.setOptions({ renderer: restrictedMd ? restrictedRenderer : renderer, }); @@ -183,14 +181,17 @@ define([ }; restrictedRenderer.image = renderer.image; + var renderParagraph = function (p) { + return //i.test(p)? p + '\n': '

' + p + '

\n'; + }; renderer.paragraph = function (p) { if (p === '[TOC]') { return '

'; } - return //i.test(p)? p + '\n': '

' + p + '

\n'; + return renderParagraph(p); }; restrictedRenderer.paragraph = function (p) { - return //i.test(p)? p + '\n': '

' + p + '

\n'; + return renderParagraph(p); }; var MutationObserver = window.MutationObserver;