Only some of templates hooked on top shown and weird parse error

I created two templates to hook on page top:

---
description: Adds last modified date/time to page
tags:
  - template
hooks.top:
  where: "parent != 'builtin' and page !~ /^📌/ and tags != 'meta' and tags != 'template'"
  order: 1
---
**Last modified:** `{{niceDateTime(@page.lastModified)}}`

and

---
description: Adds created date/time to page
tags:
  - template
hooks.top:
  where: "parent != 'builtin' and page !~ /^📌/ and tags != 'meta' and tags != 'template'"
  order: 2
---
**Created:** `{{niceDateTime(@page.created)}}`

Only the first one is shown on pages. :frowning: I have no idea why. I also see some weird errors on console:

14:05:22.377 Parse error {
  "type": "âš ",
  "from": 29,
  "to": 29,
  "children": [
    {
      "from": 29,
      "to": 29,
      "text": ""
    }
  ]
} index.plug.js:2:8131
14:05:22.377
An exception was thrown as a result of invoking function renderTemplateWidgetsTop error: Parse error in: index.plug.js:1:728
    It http://silverbullet.local:12345/_plug/index.plug.js:1
14:05:22.378
Error: Parse error in: 
    onMessage worker_sandbox.ts:93
    onmessage worker_sandbox.ts:59

Not sure if it’s related but it looks like that… I have also no idea how to debug this. Thanks for ideas.

UPDATE Idea: may it be because of the text": ""?

OK, my fault! For others, just to see, because it’s not obvious at the first glance. There’s a bad typo in the hooks.top.where clause! The page !~ should have been page !=~. Works now, closing, sorry for the mess.

Updated versions of the above:

---
description: Adds last modified date/time to page
tags:
  - template
hooks.top:
  where: "parent != 'builtin' and name !=~ /^📌/ and tags != 'meta' and tags != 'template'"
  order: 1
---
**Last modified:** `{{niceDateTime(@page.lastModified)}}`

and

---
description: Adds created date/time to page
tags:
  - template
hooks.top:
  where: "parent != 'builtin' and name !=~ /^📌/ and tags != 'meta' and tags != 'template'"
  order: 2
---
**Created:** `{{niceDateTime(@page.created)}}`

@zef Perhaps to extend syntax to support all variants?

kind eq neq long eq long neq
normal = != == !==
regex ~ !~ =~ !=~

For me more natural is ~ and !~ (dunno why) but it clearly explains the typo. :smiley: