fixed: note selection containing space

This commit is contained in:
quenousimporte 2023-11-10 10:12:48 +01:00
parent d0908b374b
commit 4cb7a1475e
1 changed files with 3 additions and 3 deletions

View File

@ -1679,7 +1679,7 @@ function commandpalette()
}
else if (hint.startsWith("Open note: "))
{
loadnote(hint.replace("Open note: ", "").replace(new RegExp(" " + tagmark + ".*"), ""));
loadnote(hint.replace("Open note: ", "").replace(new RegExp(" \\" + tagmark + ".*"), ""));
}
else if (hint.startsWith("Edit setting: "))
{
@ -2258,7 +2258,7 @@ function searchautocomplete()
{
selectnote().then(selected =>
{
selected = selected.replace(new RegExp(" " + tagmark + ".*"), "");
selected = selected.replace(new RegExp(" \\" + tagmark + ".*"), "");
insertautocomplete(selected);
});
}
@ -2267,7 +2267,7 @@ function searchandloadnote()
{
selectnote().then(selected =>
{
selected = selected.replace(new RegExp(" " + tagmark + ".*"), "");
selected = selected.replace(new RegExp(" \\" + tagmark + ".*"), "");
loadnote(selected);
});
}