Skip to content

Commit

Permalink
fix: 修复文档属性的添加tag的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyloong committed Jan 22, 2024
1 parent fe4a645 commit f2c0e15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"author": "lazyloong",

"minAppVersion": "1.0.0",
"version": "2.16.0"
"version": "2.16.1"
}
7 changes: 6 additions & 1 deletion src/viewEventHijacking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ export function hijackingTagForMarkdownView(plugin: FuzzyChinesePinyinPlugin) {
tagSuggest.getItemFunction = (query) =>
plugin.tagEditorSuggest
.getSuggestionsByString(query ?? "")
.filter((p) => !rendered.entry.value.includes(p.item.name));
.filter(
(p) =>
!rendered.entry.value ||
(rendered.entry.value &&
!rendered.entry.value.includes(p.item.name))
);
tagSuggest.selectSuggestion = function (matchData: MatchData<Item>) {
rendered["_children"][0].multiselect.addElement(matchData.item.name);
}.bind(tagSuggest);
Expand Down

0 comments on commit f2c0e15

Please sign in to comment.