RuneStone 1.0.0
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { buildOutline } from "../../../src/lib/workspace/outline.ts";
|
||||
|
||||
test("the Markdown outline skips code blocks and properties and shows rendered text", () => {
|
||||
const source = "---\ntitle: Note\n---\n# **Bold** title\n\n```sh\n# not a heading\n```\n\nSetext\n------\n";
|
||||
assert.deepEqual(buildOutline("note.md", source), [{ level: 1, text: "Bold title", line: 4 }, { level: 2, text: "Setext", line: 10 }]);
|
||||
});
|
||||
|
||||
test("code files list their definitions", () => {
|
||||
assert.deepEqual(buildOutline("tool.py", "import os\ndef run():\n pass\n"), [{ level: 1, text: "run", line: 2 }]);
|
||||
});
|
||||
Reference in New Issue
Block a user