-
Notifications
You must be signed in to change notification settings - Fork 183
Include the title of the file in the simple search #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -1583,11 +1583,17 @@ paths: | |||||||
| properties: | ||||||||
| end: | ||||||||
| type: "number" | ||||||||
| description: "End character position of the match within the file. Starts with 0." | ||||||||
| start: | ||||||||
| type: "number" | ||||||||
| description: "Start character position of the match within the file. Starts with 0." | ||||||||
coddingtonbear marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| source: | ||||||||
| type: "string" | ||||||||
|
||||||||
| type: "string" | |
| type: "string" | |
| enum: ["filename", "content"] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,7 +22,7 @@ class DataAdapter { | |||||
| _read = ""; | ||||||
| _readBinary = new ArrayBuffer(0); | ||||||
| _write: [string, string]; | ||||||
| _writeBinary : [string, ArrayBuffer]; | ||||||
| _writeBinary: [string, ArrayBuffer]; | ||||||
| _remove: [string]; | ||||||
| _stat = new Stat(); | ||||||
|
|
||||||
|
|
@@ -42,12 +42,12 @@ class DataAdapter { | |||||
| return this._readBinary; | ||||||
| } | ||||||
|
|
||||||
| async write(path: string, content: string, option?:DataWriteOptions): Promise<void> { | ||||||
| async write(path: string, content: string, option?: DataWriteOptions): Promise<void> { | ||||||
| this._write = [path, content]; | ||||||
| } | ||||||
|
|
||||||
| async writeBinary(path: string, content: ArrayBuffer, option?:DataWriteOptions): Promise<void> { | ||||||
| this._writeBinary = [path,content] | ||||||
| async writeBinary(path: string, content: ArrayBuffer, option?: DataWriteOptions): Promise<void> { | ||||||
| this._writeBinary = [path, content]; | ||||||
| } | ||||||
|
|
||||||
| async remove(path: string): Promise<void> { | ||||||
|
|
@@ -72,7 +72,7 @@ export class Vault { | |||||
| return this._cachedRead; | ||||||
| } | ||||||
|
|
||||||
| async createFolder(path: string): Promise<void> {} | ||||||
| async createFolder(path: string): Promise<void> { } | ||||||
|
|
||||||
| getFiles(): TFile[] { | ||||||
| return this._files; | ||||||
|
|
@@ -158,14 +158,15 @@ export class FileStats { | |||||
|
|
||||||
| export class TFile { | ||||||
| path = "somefile.md"; | ||||||
| basename = "somefile"; | ||||||
| stat: FileStats = new FileStats(); | ||||||
| } | ||||||
|
|
||||||
| export class PluginManifest { | ||||||
| version = ""; | ||||||
| } | ||||||
|
|
||||||
| export class SettingTab {} | ||||||
| export class SettingTab { } | ||||||
|
|
||||||
| export const apiVersion = "1.0.0"; | ||||||
|
|
||||||
|
|
@@ -174,8 +175,15 @@ export class SearchResult { | |||||
| matches: [number, number][] = []; | ||||||
| } | ||||||
|
|
||||||
| export function prepareSimpleSearch( | ||||||
| query: string | ||||||
| ): (value: string) => null | SearchResult { | ||||||
| // Mock configuration that tests can control | ||||||
| // Tests can set this to override the default behavior | ||||||
| export const _prepareSimpleSearchMock = { | ||||||
| behavior: null as ((query: string) => (text: string) => null | SearchResult) | null, | ||||||
| }; | ||||||
|
|
||||||
| export function prepareSimpleSearch(query: string): (value: string) => null | SearchResult { | ||||||
| if (_prepareSimpleSearchMock.behavior) { | ||||||
| return _prepareSimpleSearchMock.behavior(query); | ||||||
| } | ||||||
| return null; | ||||||
|
||||||
| return null; | |
| return () => null; |
Uh oh!
There was an error while loading. Please reload this page.