fix: invalid keywords can be created by user

In https://github.com/logseq/db-test/issues/278, user has graph that
contains invalid edn keyword caused by name part of keyword starting
with a number e.g. :user.property/2ndsomething. Added thorough tests
based on reference doc for both nbb and cljs versions of buggy fn. For
cljs version, allowed a few more special characters in as they've
all been confirmed to be valid edn
This commit is contained in:
Gabriel Horner
2025-05-16 14:02:17 -04:00
parent a16eb2eb10
commit 6c07d8838e
4 changed files with 99 additions and 3 deletions

View File

@@ -260,7 +260,7 @@
(is (= {:user.property/prop-bool true
:user.property/prop-num 5
:user.property/prop-string "yeehaw"
:block/tags [:logseq.class/Page :user.class/Some---Namespace]}
:block/tags [:logseq.class/Page :user.class/SomeNamespace]}
(db-test/readable-properties (db-test/find-page-by-title @conn "some page")))
"Existing page has correct properties")