fix: preserve punctuation label colors

This commit is contained in:
Shawn Koh
2026-08-11 01:19:54 +08:00
parent e658d9f7be
commit cfbd567628
2 changed files with 13 additions and 4 deletions
@@ -76,6 +76,10 @@ describe("Mermaid rendering setting", () => {
expect(rendered).not.toMatch(/\x1b\[38;2;229;229;231m[╔═╗║╚╝]/);
expect(rendered).not.toContain("\x1b[38;2;42;48;56m");
expect(rendered).not.toContain("\x1b[38;2;31;37;45m");
const labels = renderer("flowchart TD\n A[x=y]\n B[status=#1]", 80);
const text = "\x1b[38;2;229;229;231m";
expect(labels).toContain(`${text}x=y`);
expect(labels).toContain(`${text}status=#1`);
} finally {
setThemeInstance(dark);
}