marksman icon indicating copy to clipboard operation
marksman copied to clipboard

Encoding weirdness with non-ASCII characters and spaces in file links

Open silverhook opened this issue 1 year ago • 2 comments

I’m writing MarkDown notes often also in languages that are not English and include non-ASCII letters. As such I sometimes store files with names that include non-ASCII characters too. Very regularly my file names include spaces too.

Here is where I found some weirdness when it comes to Marksman (at least using it in Helix).

What I would like is to continue using links to files that make sense to the filesystem/desktop too, so even if I click on then through a MarkDown viewer (or GitHub/GitLab), I get to the right file. At the very least, I would like that Marksman does not auto-generate file links that do not work elsewhere.

Testing

These are the test files I’m looking at:

 .
├── blu.markdown
├── nekje
│   ├── bla je.markdown
│   └── bla.markdown
└── šumnik.markdown

Works

The following links work, (kinda) as expected:

[inline](<./nekje/bla.markdown#test>) [[bla#test]] [[bla je#ha]] [note the space](</nekje/bla je.markdown>) [note the space](<./nekje/bla je.markdown>) [note the space](<./nekje/bla je.markdown#ha>)

These are auto-generated and work, but look weird (and probably don’t work elsewhere):

[note the space](/nekje/bla%20je.markdown) [note the special char](/%C5%A1umnik.markdown)

Does not work

And these simply do not work (within Marksman), although I would assume they should:

[test][beh]

[beh]: ./nekje/bla je.markdown
[test][beh]

[beh]: <./nekje/bla je.markdown>

[note the space](<./nekje/bla je.markdown>#ha)

silverhook avatar Jul 17 '23 19:07 silverhook