try outputting \r\n in codeblock to help resolve downstream issue in ToMarkdown

main
macsplit 2022-05-12 20:33:31 +01:00
parent 15c455cd24
commit 4c95f760c7
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ function code_block_to_markdown (html) {
inner_html = match_code[1]; inner_html = match_code[1];
inner_html = inner_html.replace(/(<([^>]+)>)/ig, ""); inner_html = inner_html.replace(/(<([^>]+)>)/ig, "");
inner_html = htmlentities.decode(inner_html); inner_html = htmlentities.decode(inner_html);
inner_html = inner_html.replace("\n","\r\n");
const markdown = "```\n"+inner_html+"\n```\n"; const markdown = "```\n"+inner_html+"\n```\n";
return markdown; return markdown;
} }