mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-04 11:23:32 +00:00
Summary: - The PR changes the docs map generator to escape HTML-significant heading text, regenerates `docs/docs_map.md`, and adds a Vitest regression for HTML-like headings. - PR surface: Tests +13, Docs 0, Other +10. Total +23 across 3 files. - Reproducibility: yes. Current main has source headings such as `docs/cli/agents.md:164` with `<id>`, while `docs/docs_map.md:1231` omits it and `scripts/generate-docs-map.mjs:90` strips `<...>` text. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head261466a2a8. - Required merge gates passed before the squash merge. Prepared head SHA:261466a2a8Review: https://github.com/openclaw/openclaw/pull/99099#issuecomment-4866739708 Co-authored-by: Mason Huang <masonxhuang@tencent.com> Approved-by: hxy91819
14 lines
488 B
TypeScript
14 lines
488 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { testing } from "../../scripts/generate-docs-map.mjs";
|
|
|
|
describe("generate docs map", () => {
|
|
it("renders heading HTML as text", () => {
|
|
expect(testing.cleanHeadingText("`API` <script>alert(1)</script>")).toBe(
|
|
"API <script>alert(1)</script>",
|
|
);
|
|
expect(testing.cleanHeadingText("<scr<script>ipt>alert(1)</script>")).toBe(
|
|
"<scr<script>ipt>alert(1)</script>",
|
|
);
|
|
});
|
|
});
|