1
0

Move "tags" plug into core

This commit is contained in:
Zef Hemel 2022-07-04 11:38:05 +02:00
parent 1ad9b82631
commit f29f9315a1
4 changed files with 17 additions and 18 deletions

View File

@ -1,5 +1,11 @@
name: core name: core
syntax: syntax:
Hashtag:
firstCharacters:
- "#"
regex: "#[^#\\s]+"
styles:
color: blue
NakedURL: NakedURL:
firstCharacters: firstCharacters:
- "h" - "h"
@ -63,6 +69,16 @@ functions:
events: events:
- page:click - page:click
# Hashtags
indexTags:
path: "./tags.ts:indexTags"
events:
- page:index
tagComplete:
path: "./tags.ts:tagComplete"
events:
- page:complete
# Full text search # Full text search
searchIndex: searchIndex:
path: ./search.ts:index path: ./search.ts:index

View File

@ -1,17 +0,0 @@
name: tags
syntax:
Hashtag:
firstCharacters:
- "#"
regex: "#[^#\\s]+"
styles:
color: blue
functions:
indexTags:
path: "./tags.ts:indexTags"
events:
- page:index
tagComplete:
path: "./tags.ts:tagComplete"
events:
- page:complete

View File

@ -26,7 +26,7 @@ import {
replaceNodesMatching, replaceNodesMatching,
} from "@silverbulletmd/common/tree"; } from "@silverbulletmd/common/tree";
import { removeQueries } from "../query/util"; import { removeQueries } from "../query/util";
import { applyQuery, QueryProviderEvent, renderQuery } from "../query/engine"; import { applyQuery, QueryProviderEvent } from "../query/engine";
import { niceDate } from "../core/dates"; import { niceDate } from "../core/dates";
export type Task = { export type Task = {