From f29f9315a1a866f6ab852a5c7497bd695f5ead7a Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 4 Jul 2022 11:38:05 +0200 Subject: [PATCH] Move "tags" plug into core --- packages/plugs/core/core.plug.yaml | 16 ++++++++++++++++ packages/plugs/{tags => core}/tags.ts | 0 packages/plugs/tags/tags.plug.yaml | 17 ----------------- packages/plugs/tasks/task.ts | 2 +- 4 files changed, 17 insertions(+), 18 deletions(-) rename packages/plugs/{tags => core}/tags.ts (100%) delete mode 100644 packages/plugs/tags/tags.plug.yaml diff --git a/packages/plugs/core/core.plug.yaml b/packages/plugs/core/core.plug.yaml index 7c7c7a15..61bb128e 100644 --- a/packages/plugs/core/core.plug.yaml +++ b/packages/plugs/core/core.plug.yaml @@ -1,5 +1,11 @@ name: core syntax: + Hashtag: + firstCharacters: + - "#" + regex: "#[^#\\s]+" + styles: + color: blue NakedURL: firstCharacters: - "h" @@ -63,6 +69,16 @@ functions: events: - page:click + # Hashtags + indexTags: + path: "./tags.ts:indexTags" + events: + - page:index + tagComplete: + path: "./tags.ts:tagComplete" + events: + - page:complete + # Full text search searchIndex: path: ./search.ts:index diff --git a/packages/plugs/tags/tags.ts b/packages/plugs/core/tags.ts similarity index 100% rename from packages/plugs/tags/tags.ts rename to packages/plugs/core/tags.ts diff --git a/packages/plugs/tags/tags.plug.yaml b/packages/plugs/tags/tags.plug.yaml deleted file mode 100644 index 1ac83306..00000000 --- a/packages/plugs/tags/tags.plug.yaml +++ /dev/null @@ -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 diff --git a/packages/plugs/tasks/task.ts b/packages/plugs/tasks/task.ts index 5e00467d..571d6c56 100644 --- a/packages/plugs/tasks/task.ts +++ b/packages/plugs/tasks/task.ts @@ -26,7 +26,7 @@ import { replaceNodesMatching, } from "@silverbulletmd/common/tree"; import { removeQueries } from "../query/util"; -import { applyQuery, QueryProviderEvent, renderQuery } from "../query/engine"; +import { applyQuery, QueryProviderEvent } from "../query/engine"; import { niceDate } from "../core/dates"; export type Task = {