Allow custom separator for multi-value properties to be specified in config.edn

It would be very helpful, it seems to me, if for properties users could specify a multi-value separator other than a comma.

For instance, it will solve problems that most users will encounter if they have author:: properties on their notes pages and want to specify multiple authors for the work to which a given set of notes pertain.

To handle the case of multiple authors, you would typically add “:author” in the :property/separate-by-commas list in config.edn, and then, in any given notes page, list the various authors in an author:: property, separating them with commas.

This approach works fine if you list authors as “Firstname Lastname”. But most users will want to list authors in the traditional “Lastname, Firstname” format. At present this creates two problems.

First, given that commas are part of each author’s name, there’s no easy to way to demarcate one author from the next on the author:: property. The only way I’ve found to do this is to surround each author’s name with double square brackets. This allows Logseq’s query engine to correctly identify each author in the property list as a separate value. But this approach has a downside in that Logseq will create new pages for each author listed, even if :property-pages/enabled? is set to false. This is not a result many users will want.

Second, if you use double square brackets to separate multiple authors, Logseq’s query engine will only find those authors if they are specified in the query with the double square brackets included. A query designed to identify pages or blocks with just “Lastname, Firstname” as a value for the author:: property will not return any pages or blocks in which that same author 's name is listed with surrounding square brackets. Since, on pages or blocks with just a single value for the author:: property, most users will specify the author’s name without using surrounding square brackets, that’s a problem. For consistency in querying, you’d have to specify each and every author with surrounding square brackets, for single- and multi-authored works alike. But that would cause Logseq to create new pages for each and every author in the database – again an outcome not many users will like.

Both problems go away if users could specify, say, a semi-colon as their preferred multi-value property separator.

Related: