mirror of
https://github.com/zadam/trilium.git
synced 2026-01-17 20:14:25 +01:00
chore(export/markdown): add test for jQuery-like text inside table
This commit is contained in:
parent
51157e1979
commit
3aacd255f4
@ -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 = $("<div>");</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 = $("<div>");</code>
|
||||
</pre></td></tr></tbody></table>`;
|
||||
expect(markdownExportService.toMarkdown(html)).toBe(expected);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user