chore(export/markdown): add test for jQuery-like text inside table

This commit is contained in:
Elian Doran 2026-01-17 12:58:24 +02:00
parent 51157e1979
commit 3aacd255f4
No known key found for this signature in database

View File

@ -406,4 +406,33 @@ describe("Markdown export", () => {
expect(markdownExportService.toMarkdown(html)).toBe(expected);
});
it("exports jQuery code in table properly", () => {
const html = trimIndentation`\
<figure class="table">
<table>
<thead>
<tr>
<th>
Code
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre>
<code class="language-text-x-trilium-auto">this.$widget = $("&lt;div&gt;");</code>
</pre>
</td>
</tr>
</tbody>
</table>
</figure>
`;
const expected = trimIndentation`\
<table><thead><tr><th>Code</th></tr></thead><tbody><tr><td><pre><code class="language-text-x-trilium-auto">this.$widget = $("&lt;div&gt;");</code>
</pre></td></tr></tbody></table>`;
expect(markdownExportService.toMarkdown(html)).toBe(expected);
});
});