chore(frontend): commit remaining workspace updates

This commit is contained in:
2026-10-01 12:24:50 +03:30
parent 0f5ec429d0
commit 57c8da1326
8 changed files with 56 additions and 22 deletions

View File

@@ -0,0 +1,14 @@
import assert from "node:assert/strict";
import test from "node:test";
import { extractMarkdownHeadings } from "../src/lib/markdown-headings.ts";
test("keeps markdown heading IDs tied to their source lines", () => {
assert.deepEqual(
extractMarkdownHeadings("# مقدمه\n\n## موضوع\n## موضوع"),
[
{ id: "مقدمه", level: 1, text: "مقدمه", line: 1 },
{ id: "موضوع", level: 2, text: "موضوع", line: 3 },
{ id: "موضوع-2", level: 2, text: "موضوع", line: 4 },
],
);
});