From 88bb51227be9adb201dcc5f88d06ae7aaa9fdf13 Mon Sep 17 00:00:00 2001 From: macsplit Date: Fri, 13 May 2022 13:03:37 +0100 Subject: [PATCH] revert double newline in code blocks --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index edf4cd1..9c6f9da 100755 --- a/index.js +++ b/index.js @@ -173,7 +173,7 @@ function code_block_to_markdown (html) { const match_code = /^\s*]*>[\r\n]*([\s\S]*)<\/code>\s*$/ig.exec(inner_html); if (match_code && match_code[1]) inner_html = match_code[1]; - inner_html = inner_html.replaceAll(/]*>/ig,"\n\n"); + inner_html = inner_html.replaceAll(/]*>/ig,"\n"); inner_html = inner_html.replaceAll(/<[^>]+>/ig, ""); inner_html = htmlentities.decode(inner_html); const markdown = "```\n"+inner_html+"\n```\n";