remove newlines only in the context of ordered lists - TODO check unordered
parent
8d73c29f1a
commit
af48a672c7
|
@ -33,7 +33,12 @@ exports.setPadHTML = async (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(/<ol>\n/gm,"<ol>")
|
||||||
|
.replace(/<\/ol>\n/gm,"</ol>")
|
||||||
|
.replace(/<li>\n/gm,"<li>")
|
||||||
|
.replace(/<\/li>\n/gm,"</li>")
|
||||||
|
.replace(/>\n<\/li>/gm,"></li>")
|
||||||
})
|
})
|
||||||
|
|
||||||
var $ = cheerio.load(html);
|
var $ = cheerio.load(html);
|
||||||
|
|
Loading…
Reference in New Issue