1
0

Template cleanup, autocomplete for more query stuff

This commit is contained in:
Zef Hemel
2022-07-04 15:07:27 +02:00
parent e2e7e2f936
commit 60cfefbc95
18 changed files with 235 additions and 69 deletions
+1
View File
@@ -9,3 +9,4 @@ export const CommentTag = Tag.define();
export const CommentMarkerTag = Tag.define();
export const BulletList = Tag.define();
export const OrderedList = Tag.define();
export const Highlight = Tag.define();
+26
View File
@@ -53,6 +53,31 @@ const WikiLink: MarkdownConfig = {
],
};
const HighlightDelim = { resolve: "Highlight", mark: "HighlightMark" };
export const Strikethrough: MarkdownConfig = {
defineNodes: [
{
name: "Highlight",
style: { "Highlight/...": ct.Highlight },
},
{
name: "HighlightMark",
style: t.processingInstruction,
},
],
parseInline: [
{
name: "Highlight",
parse(cx, next, pos) {
if (next != 61 /* '=' */ || cx.char(pos + 1) != 61) return -1;
return cx.addDelimiter(HighlightDelim, pos, pos + 2, true, true);
},
after: "Emphasis",
},
],
};
class CommentParser implements LeafBlockParser {
nextLine() {
return false;
@@ -88,6 +113,7 @@ export default function buildMarkdown(mdExtensions: MDExt[]): Language {
WikiLink,
TaskList,
Comment,
Strikethrough,
Table,
...mdExtensions.map(mdExtensionSyntaxConfig),
// parseCode({