MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / walkHtml

Function walkHtml

apps/docs/scripts/check-rendered-markdown.mjs:23–34  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

21const DIST = resolve(dirname(fileURLToPath(import.meta.url)), "..", "dist");
22
23function walkHtml(dir) {
24 const out = [];
25 for (const entry of readdirSync(dir)) {
26 const full = join(dir, entry);
27 if (statSync(full).isDirectory()) {
28 out.push(...walkHtml(full));
29 } else if (entry.endsWith(".html")) {
30 out.push(full);
31 }
32 }
33 return out;
34}
35
36/* Reduce a page to its visible prose so we only test real rendered text.
37 * Order matters: drop code blocks (where literal table syntax is a legitimate

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected