Remove "syntax" support from plugs

This commit is contained in:
Zef Hemel
2024-01-24 13:34:12 +01:00
parent aaacec6d61
commit ad4a795e7f
24 changed files with 185 additions and 315 deletions
+2 -7
View File
@@ -1,9 +1,8 @@
import "$sb/lib/syscall_mock.ts";
import { parse } from "../../common/markdown_parser/parse_tree.ts";
import buildMarkdown from "../../common/markdown_parser/parser.ts";
import { assertEquals } from "../../test_deps.ts";
import { extractFeedItems } from "$sb/lib/feed.ts";
import { nodeDefToMDExt } from "../../common/markdown_parser/markdown_ext.ts";
import { extendedMarkdownLanguage } from "../../common/markdown_parser/parser.ts";
const feedSample1 = `---
test: ignore me
@@ -25,11 +24,7 @@ Completely free form
Deno.test("Test feed parsing", async () => {
// Ad hoc added the NamedAnchor extension from the core plug-in inline here
const lang = buildMarkdown([nodeDefToMDExt("NamedAnchor", {
firstCharacters: ["$"],
regex: "\\$[a-zA-Z\\.\\-\\/]+[\\w\\.\\-\\/]*",
})]);
const tree = parse(lang, feedSample1);
const tree = parse(extendedMarkdownLanguage, feedSample1);
const items = await extractFeedItems(tree);
assertEquals(items.length, 3);
assertEquals(items[0], {