bug fixes and wysiwyg behaviour improvements

This commit is contained in:
gsb
2026-04-30 22:47:26 +00:00
parent 5b2bd94388
commit 24560a4d21
7 changed files with 1014 additions and 25 deletions
+15
View File
@@ -534,3 +534,18 @@ describe('Backslash-escaped HTML tags', () => {
expect(rehtml).toBe(rehtml2);
});
});
describe('Table cell round-trip', () => {
it('inline formatting in cells survives round-trip', () => {
const html = '<table><thead><tr><th>A</th><th>B</th></tr></thead><tbody><tr><td><strong>bold</strong></td><td><em>italic</em></td></tr></tbody></table>';
expect(H(M(html))).toBe(html);
});
it('code in cells survives round-trip', () => {
const html = '<table><thead><tr><th>A</th></tr></thead><tbody><tr><td><code>x</code></td></tr></tbody></table>';
expect(H(M(html))).toBe(html);
});
it('literal * in cells survives round-trip', () => {
const html = '<table><thead><tr><th>A</th></tr></thead><tbody><tr><td>2 * 3</td></tr></tbody></table>';
expect(H(M(html))).toBe(html);
});
});