Skip to content

Commit

Permalink
fix: #56
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyloong committed Jun 26, 2024
1 parent dce0e0d commit 32cf811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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.26.0"
"version": "2.26.1"
}
6 changes: 3 additions & 3 deletions src/editorSuggest/fileEditorSuggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface FileResult extends Result<"file"> {
}
interface LinktextResult extends Result<"linktext"> {}
interface HeadingResult extends Result<"heading"> {
subpath: "#";
subpath: `#${string}`;
heading: string;
level: number;
file: TFile;
Expand All @@ -48,7 +48,7 @@ export default class FileEditorSuggest extends EditorSuggest<MatchData> {
constructor(app: App, plugin: ThePlugin) {
super(app);
this.originEditorSuggest = app.workspace.editorSuggest.suggests.find(
(p: any) => p?.suggestManager?.mode == "file"
(p: any) => p?.suggestManager
);
this.plugin = plugin;
this.index = this.plugin.fileModal.index;
Expand Down Expand Up @@ -186,7 +186,7 @@ export default class FileEditorSuggest extends EditorSuggest<MatchData> {
type: "heading",
path: item.file == file ? "" : item.file.basename,
file: item.file,
subpath: "#",
subpath: `#${isLinkItem(item) ? item.link : item.name}`,
level: 1,
matches: null,
score: 0,
Expand Down

0 comments on commit 32cf811

Please sign in to comment.