when I use this query
page where name =~ /^Diario\// and name =~ /\d{4}-\d{2}-\d{2}/ select name
I found exactly the pages I’m searching
But if I put the same query in a template with {{#each}} - {{/each}}
{{#each {page where name =~ /^Diario\// and name =~ /\d{4}-\d{2}-\d{2}/}}}
{{name}}
{{/each}}
Silverbullet throw me a Parse Error.
What I’m doing wrong?
PS
I’ve tried ti use the escapeRegx but i’ve got the same result.
Removing the first check and then the second check shows that the issue is the second one:
name =~ /\d{4}-\d{2}-\d{2}/
I can almost guarantee the issue there is that the }
are catching in the parsing and so the template is seeing these bits as separate sections of the code:
{page where name =~ /^Diario\// and name =~ /\d{4}
-\d{2}-\d{2}/}
I Imagine there’s a real solution that someone can come up with, but if you want something lazy that works:
{{#each {page where name =~ /^Diario\// and name =~ /\d\d\d\d-\d\d-\d\d/}}}
{{name}}
{{/each}}
Thank, I will adopt the lazy solution that works.