Fix ref links in tables regression

This commit is contained in:
Zef Hemel
2026-05-06 16:46:05 +02:00
parent 21e7418db3
commit 15ccabc361
2 changed files with 25 additions and 2 deletions
@@ -409,6 +409,23 @@ test("e2e: table with wiki links produces clickable links", async () => {
);
});
test("e2e: ref column is rendered as a wiki link", async () => {
const row = new LuaTable();
await row.rawSet("name", "Alice");
await row.rawSet("ref", "SomePage");
const tbl = new LuaTable();
await tbl.rawSet(1, row);
expect(toHtml(tbl)).toBe(
"<table><thead><tr><th>name</th><th>ref</th></tr></thead><tbody>" +
'<tr><td data-table-cell-type="string">Alice</td>' +
'<td data-table-cell-type="string">' +
'<a href="/SomePage" class="wiki-link" data-ref="SomePage">SomePage</a>' +
"</td></tr></tbody></table>",
);
});
test("e2e: table with bold text renders strong tags", async () => {
const row = new LuaTable();
await row.rawSet("note", "**important**");