From dd5d7ccda4cd6ed8befae2e05ea7e7cf355173d4 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Thu, 13 Jan 2022 19:48:17 +0100 Subject: [PATCH] fix(plugins/code): missing newlines (#768) [skip ci] --- source/plugins/code/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/code/index.mjs b/source/plugins/code/index.mjs index bfb00e8c..baf3a822 100644 --- a/source/plugins/code/index.mjs +++ b/source/plugins/code/index.mjs @@ -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")) //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, "
") } //Results