Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted removal of non-word characters #44

Open
stylekilla opened this issue Nov 1, 2023 · 3 comments
Open

Unwanted removal of non-word characters #44

stylekilla opened this issue Nov 1, 2023 · 3 comments

Comments

@stylekilla
Copy link

Hey, love that you wrote this plugin, very useful.

I've encountered one issue that is beyond the scope of the traditional use in programming.
If I select a line that contains non-word characters (i.e. any symbol, !@#$%^&&*()[] etc.) they get automatically removed when I apply a case change.

Particularly, I use super+L to select a line of text, a heading for example:
### My heading

and then I want to convert it using Capital Case (or another) so it reads:
### My Heading

But instead it comes out as:
My Heading

Because you can have symbols in a markdown environment, and it's not used for strict programming formatting, it would be nice if it retained the symbols too.
I assume that's only a small regex formula adjustment (i.e. something similar to https://stackoverflow.com/questions/834002/regular-expression-that-includes-all-keyboard-characters-except-and

@stylekilla
Copy link
Author

Nevermind, in my haste I didn't read the README. My fault. Can we have an option to add characters to the regex pattern in the module settings?

@dbrockman
Copy link
Owner

I'll have another look at this soon. I made the plugin because I was referencing a lot of programming stuff in my notes and it was nice to be able to convert to camelCase and so on. But maybe the plugin should be more broadly usable.

@Cammagno
Copy link

The removal behavior is also applied to the / character.

It would be really helpful if we can edit the list of characters that must be stripped.

Anyway, great plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants