Rewrote all plugs using MarkdownTree
This commit is contained in:
+5
-11
@@ -1,14 +1,8 @@
|
||||
import { styleTags, tags as t } from "@codemirror/highlight";
|
||||
import {
|
||||
BlockContext,
|
||||
LeafBlock,
|
||||
LeafBlockParser,
|
||||
MarkdownConfig,
|
||||
TaskList,
|
||||
} from "@lezer/markdown";
|
||||
import { commonmark, mkLang } from "./markdown/markdown";
|
||||
import {styleTags, tags as t} from "@codemirror/highlight";
|
||||
import {BlockContext, LeafBlock, LeafBlockParser, MarkdownConfig, TaskList,} from "@lezer/markdown";
|
||||
import {commonmark, mkLang} from "./markdown/markdown";
|
||||
import * as ct from "./customtags";
|
||||
import { pageLinkRegex } from "./constant";
|
||||
import {pageLinkRegex} from "./constant";
|
||||
|
||||
const pageLinkRegexPrefix = new RegExp(
|
||||
"^" + pageLinkRegex.toString().slice(1, -1)
|
||||
@@ -28,7 +22,7 @@ const WikiLink: MarkdownConfig = {
|
||||
return -1;
|
||||
}
|
||||
return cx.addElement(
|
||||
cx.elt("WikiLink", pos, pos + match[0].length + 1, [
|
||||
cx.elt("WikiLink", pos, pos + match[0].length, [
|
||||
cx.elt("WikiLinkPage", pos + 2, pos + match[0].length - 2),
|
||||
])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user