srid/neuron

Files with `§` in title not recognized

danymat opened this issue · 5 comments

I'm currently using the § character to add structure to my ZK (§§, §1, etc).
I think this character is not recognized by neuron

Steps to reproduce

  1. Create a file test.md
  2. Create a second file §2\ test.md
  3. Link the second file in the first file
  4. Only the first file will be recognized
srid commented

How are you linking to it?

See also #446

For example I have a file called: 202102241246 §1 Zettelkasten.md

In its content I have:

## Objectif

- [[202102081550 L'objectif d'un slip-box]]

which is linking the file 202102081550 L'objectif d'un slip-box.md

The problem is that even neuron query doesn't return any file with a § on it.

srid commented

Okay. That character is not allowed in the whitelist:

-- | Characters, aside from alpha numeric characters, to allow in IDs
allowedSpecialChars :: [Char]
allowedSpecialChars =
[ '_',
'-',
'.',
-- Whitespace is essential for title IDs
-- This gets replaced with underscope in ID slug
' ',
-- Allow some puctuation letters that are common in note titles
',',
';',
'(',
')',
':',
'"',
'\'',
'@'
]

I'm trying to recall the rationale for that. Filesystem filepath and URI limitations are the main reason I think.

Nice, I was wondering where you defined the parsing whitelist.
I propose to add this special character to the whitelist (except if there is a way to add personal whitelist in the config file)

srid commented

Sounds good to me, feel free to open a PR (the CI will catch any errors).