mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-27 19:06:15 -04: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 what happens if <title is used somewhere in the pad? need proper XML parser
|
||||||
* @todo does not work all the time
|
* @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.
|
// node on windows has a delay on releasing of the file lock.
|
||||||
// We add a 100ms delay to work around this
|
// 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 contentcollector = require("ep_etherpad-lite/static/js/contentcollector");
|
||||||
const cheerio = require("cheerio");
|
const cheerio = require("cheerio");
|
||||||
const rehype = require("rehype")
|
const rehype = require("rehype")
|
||||||
const format = require("rehype-format")
|
//const format = require("rehype-format")
|
||||||
|
|
||||||
|
|
||||||
exports.setPadHTML = function(pad, html)
|
exports.setPadHTML = function(pad, html)
|
||||||
|
@ -32,9 +32,9 @@ exports.setPadHTML = function(pad, html)
|
||||||
}
|
}
|
||||||
|
|
||||||
rehype()
|
rehype()
|
||||||
.use(format, opts)
|
// .use(format, opts)
|
||||||
.process(html, function(err, output){
|
.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);
|
var $ = cheerio.load(html);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue