mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
no title replacement
no rehype-format replace newlines with spaces
This commit is contained in:
parent
17fac52aba
commit
eee8d56477
2 changed files with 5 additions and 5 deletions
|
@ -215,8 +215,8 @@ async function doImport(req, res, padId)
|
|||
* @todo what happens if <title is used somewhere in the pad? need proper XML parser
|
||||
* @todo does not work all the time
|
||||
*/
|
||||
text = text.replace("<title", "<!-- <title");
|
||||
text = text.replace("</title>","</title>-->");
|
||||
//text = text.replace("<title", "<!-- <title");
|
||||
//text = text.replace("</title>","</title>-->");
|
||||
|
||||
// node on windows has a delay on releasing of the file lock.
|
||||
// We add a 100ms delay to work around this
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue