Regex and tag filter issues
Closed this issue · 1 comments
tmichela commented
It looks like regex filter does not work if a page has children. E.g. filtering the Library
does not work with regex.
However it works with the space-script filter, e.g.:
silverbullet.registerFunction({name: "filterLibrary"}, async (page) => {
if (page.name.startsWith("Library/")) {
return true;
}
return false;
});
I'm using the current edge
release of sb, and the latest version of the treeview plug.
tmichela commented
Ah, nevermind. The issue is that I was confused with the example given:
rule: "^(?:SETTINGS|PLUGS|index|Library)$"
which won't work for Library since it has children pages that won't be filtered by this rule, but this does:
rule: "Library"