From f02cca7385f49a3f71f8745ea7b9b23d0de16f41 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 17 Dec 2024 23:42:31 +0200 Subject: [PATCH] chore(test): test for no language tag for codeblock export --- spec/services/export/md.spec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spec/services/export/md.spec.ts b/spec/services/export/md.spec.ts index 980f7fa2c..f9a4e4ab1 100644 --- a/spec/services/export/md.spec.ts +++ b/spec/services/export/md.spec.ts @@ -37,5 +37,16 @@ describe("Markdown export", () => { \`\`\``; expect(markdownExportService.toMarkdown(html)).toBe(expected); - }) + }); + + it("supports code block with no language tag", () => { + const html = trimIndentation`\ +
Hello
`; + const expected = trimIndentation`\ + \`\`\` + Hello + \`\`\``; + + expect(markdownExportService.toMarkdown(html)).toBe(expected); + }); }); \ No newline at end of file