Skip to content

Build your personal knowledge base with Trilium Notes

chore(test): test for no language tag for codeblock export

Elian Doranf02cca7385f4
diff --git a/spec/services/export/md.spec.ts b/spec/services/export/md.spec.ts
index 980f7fa2cc..f9a4e4ab13 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`\
+ <pre><code>Hello</code></pre>`;
+ const expected = trimIndentation`\
+ \`\`\`
+ Hello
+ \`\`\``;
+
+ expect(markdownExportService.toMarkdown(html)).toBe(expected);
+ });
});
\ No newline at end of file