mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 16:51:13 +00:00
* fix(slack): restore table block mode seam Restore the shared markdown/config seam needed for Slack Block Kit table support, while coercing non-Slack block mode back to code. * fix(slack): narrow table block seam defaults Keep Slack table block mode opt-in in this seam-only PR, clamp collected placeholder offsets, and align fallback-table rendering with Slack block limits. * fix(slack): bound table fallback rendering Avoid spread-based maxima and bound Slack table fallback rendering by row, column, cell-width, and total-output limits to prevent resource exhaustion. * fix(slack): keep block mode inactive in seam PR Keep markdown table block mode schema-valid but runtime-resolved to code until the Slack send path is wired to emit table attachments. * fix(slack): normalize configured block mode safely Accept configured markdown table block mode at parse time, then normalize it back to code during runtime resolution so seam-only branches do not drop table content.
13 lines
431 B
TypeScript
13 lines
431 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { convertMarkdownTables } from "./tables.js";
|
|
|
|
describe("convertMarkdownTables", () => {
|
|
it("falls back to code rendering for block mode", () => {
|
|
const rendered = convertMarkdownTables("| A | B |\n|---|---|\n| 1 | 2 |", "block");
|
|
|
|
expect(rendered).toContain("```");
|
|
expect(rendered).toContain("| A | B |");
|
|
expect(rendered).toContain("| 1 | 2 |");
|
|
});
|
|
});
|