fix todotxt autosort

This commit is contained in:
quenousimporte 2024-02-15 09:35:21 +01:00
parent 8d0b4bef5e
commit 5a30250932
1 changed files with 9 additions and 4 deletions

13
main.js
View File

@ -2283,7 +2283,12 @@ function searchandloadnote()
function currentistodo() function currentistodo()
{ {
return title.value.includes("todo") || gettags(md.value).includes("todo"); return istodo(title.value, md.value);
}
function istodo(title, content)
{
return title.includes("todo") || gettags(content).includes("todo");
} }
function sorttodotxt(content) function sorttodotxt(content)
@ -2862,10 +2867,10 @@ function loadnote(title)
} }
} }
/*if (settings.autosorttodo && istodo(note)) if (settings.autosorttodo && istodo(title, content))
{ {
sorttodotxt(note); content = sorttodotxt(content);
}*/ }
bind(item.title, content, item.pos); bind(item.title, content, item.pos);