platers / obsidian-linter

An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
https://platers.github.io/obsidian-linter/
MIT License
1.18k stars 79 forks source link

FR: Swap Out Restricted Characters from Titles #938

Open cstby opened 10 months ago

cstby commented 10 months ago

Is Your Feature Request Related to a Problem? Please Describe.

When my note titles contain question marks ?, they don't sync properly from Linux to Android. I find it difficult to remember to use an emoji or alternative symbol when typing questions as note titles.

Describe the Solution You'd Like

I'd like a linting rule for note titles. Either character replacement or regex replacment would work great. My use case only concerns question marks and the Linux and Android operating systems, but there are many restricted characters across the platforms supported by Obsidian.

Please include an example where applicable:

Why does Obsidian fail to sync question marks?
Why does Obsidian fail to sync question marks‽

Describe Alternatives You've Considered

My alternative solutions are:

Additional Context

The Obsidian team doesn't plan to allow restricted characters in note titles because they are sticking to using note titles as filenames. This does seem like the right approach, but this has caused many users to run into issues with file syncing.

apotenza92 commented 8 months ago

I've run into this problem when using Obsidian web clipping tools to save articles. Often titles will contain ? or | characters which conflict with syncing services.

Looks like this is a good place to start for a default list of disallowed characters to support the major operating systems: https://stackoverflow.com/a/35352640

Then maybe give the user a simple option for 'Replacement Character' to replace all restricted characters.

In future could also allow the user the additional complexity of replacing each restricted character individually if they wanted to.