Introduced `normalizePath(...)` for consuming a path to note from plugin settings
This commit is contained in:
parent
ab1dfdfb02
commit
6e54db9f1c
|
@ -3,6 +3,7 @@ import {
|
||||||
FileExplorerView,
|
FileExplorerView,
|
||||||
MetadataCache,
|
MetadataCache,
|
||||||
Notice,
|
Notice,
|
||||||
|
normalizePath,
|
||||||
Plugin,
|
Plugin,
|
||||||
PluginSettingTab,
|
PluginSettingTab,
|
||||||
setIcon,
|
setIcon,
|
||||||
|
@ -332,7 +333,7 @@ class CustomSortSettingTab extends PluginSettingTab {
|
||||||
.setPlaceholder('e.g. note.md')
|
.setPlaceholder('e.g. note.md')
|
||||||
.setValue(this.plugin.settings.additionalSortspecFile)
|
.setValue(this.plugin.settings.additionalSortspecFile)
|
||||||
.onChange(async (value) => {
|
.onChange(async (value) => {
|
||||||
this.plugin.settings.additionalSortspecFile = value;
|
this.plugin.settings.additionalSortspecFile = normalizePath(value);
|
||||||
await this.plugin.saveSettings();
|
await this.plugin.saveSettings();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue