From 0a6aeac5dabae2ddfeb264a2beddb2f378d9647a Mon Sep 17 00:00:00 2001 From: oeyoews Date: Mon, 7 Oct 2024 14:28:29 +0800 Subject: [PATCH] fix: better fields word check --- CHANGELOG.md | 1 + package.json | 2 +- packages/lang-tiddlywiki/package.json | 2 +- src/tiddlywiki-codemirror-6/modules/completions/index.ts | 2 +- src/tiddlywiki-codemirror-6/plugin.info | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 478cc38..215b878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@

Changelog

+* `2.9.1`: fields completion support xxx-xxx * `2.9.0`: support fields completion * `2.8.2`: add changelog * `2.7.0`: 添加恢复默全部设置按钮 diff --git a/package.json b/package.json index 6b936e4..02846f1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "registry": "https://registry.npmjs.org" }, "license": "MIT", - "version": "2.9.0", + "version": "2.9.1", "packageManager": "pnpm@9.0.6", "scripts": { "update:config": " pnpm ts-node scripts/generateConfig.ts", diff --git a/packages/lang-tiddlywiki/package.json b/packages/lang-tiddlywiki/package.json index 3b732f9..e57b852 100644 --- a/packages/lang-tiddlywiki/package.json +++ b/packages/lang-tiddlywiki/package.json @@ -1,6 +1,6 @@ { "name": "lang-tiddlywiki", - "version": "2.8.2", + "version": "2.9.1", "description": "", "scripts": { "build": "cm-buildhelper src/tiddlywiki.ts" diff --git a/src/tiddlywiki-codemirror-6/modules/completions/index.ts b/src/tiddlywiki-codemirror-6/modules/completions/index.ts index 79f5347..4f1dc23 100644 --- a/src/tiddlywiki-codemirror-6/modules/completions/index.ts +++ b/src/tiddlywiki-codemirror-6/modules/completions/index.ts @@ -53,7 +53,7 @@ export default (widget: IWidget, self: any) => { function checkFieldStart(word: string) { // : const regex = - /^@[a-zA-Z0-9_\u4e00-\u9fa5]+[:][a-zA-Z0-9_\u4e00-\u9fa5]+$/; + /^@[a-zA-Z0-9_-\u4e00-\u9fa5]+[:][a-zA-Z0-9_-\u4e00-\u9fa5]+$/; return regex.test(word); } diff --git a/src/tiddlywiki-codemirror-6/plugin.info b/src/tiddlywiki-codemirror-6/plugin.info index 11df73a..4888cb6 100644 --- a/src/tiddlywiki-codemirror-6/plugin.info +++ b/src/tiddlywiki-codemirror-6/plugin.info @@ -2,7 +2,7 @@ "title": "$:/plugins/oeyoews/tiddlywiki-codemirror-6", "name": "CodeMirror6", "description": "CodeMirror 6 editor", - "version": "2.9.0", + "version": "2.9.1", "core-version": ">=5.3.4", "list": "readme changelog" } \ No newline at end of file