From eee8d564773175d62482a9cffc2b4660c76f844d Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Mon, 14 Sep 2020 13:56:12 +0200 Subject: [PATCH] no title replacement no rehype-format replace newlines with spaces --- src/node/handler/ImportHandler.js | 4 ++-- src/node/utils/ImportHtml.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 4fc2e686c..25d98f09a 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -215,8 +215,8 @@ async function doImport(req, res, padId) * @todo what happens if ","-->"); + //text = text.replace("","-->"); // node on windows has a delay on releasing of the file lock. // We add a 100ms delay to work around this diff --git a/src/node/utils/ImportHtml.js b/src/node/utils/ImportHtml.js index 2dde8c6c1..ff7c76b59 100644 --- a/src/node/utils/ImportHtml.js +++ b/src/node/utils/ImportHtml.js @@ -19,7 +19,7 @@ const Changeset = require("ep_etherpad-lite/static/js/Changeset"); const contentcollector = require("ep_etherpad-lite/static/js/contentcollector"); const cheerio = require("cheerio"); const rehype = require("rehype") -const format = require("rehype-format") +//const format = require("rehype-format") exports.setPadHTML = function(pad, html) @@ -32,9 +32,9 @@ exports.setPadHTML = function(pad, html) } rehype() - .use(format, opts) +// .use(format, opts) .process(html, function(err, output){ - //html = String(output).replace(/(\r\n|\n|\r)/gm,""); + html = String(output).replace(/(\n\r|\n|\r)/gm," "); }) var $ = cheerio.load(html);