fix(plugins/code): missing newlines (#768) [skip ci]

This commit is contained in:
Simon Lecoq
2022-01-13 19:48:17 +01:00
committed by GitHub
parent 9be4781605
commit dd5d7ccda4

View File

@@ -58,7 +58,7 @@ export default async function({login, q, imports, data, rest, account}, {enabled
const content = imports.htmlescape(snippet.patch.replace(/\r\n/mg, "\n").replace(new RegExp(`^([+-]?)${" ".repeat(indent)}`, "mg"), "$1")) const content = imports.htmlescape(snippet.patch.replace(/\r\n/mg, "\n").replace(new RegExp(`^([+-]?)${" ".repeat(indent)}`, "mg"), "$1"))
//Format patch //Format patch
snippet.patch = imports.htmlunescape((await imports.highlight(content, "diff")).trim()) snippet.patch = imports.htmlunescape((await imports.highlight(content, "diff")).trim()).replace(/\n/g, "<br/>")
} }
//Results //Results