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

[Change Case] Preserve the punctuations such as period when changing to upper case #16033

Open
Garfield-Finch opened this issue Dec 25, 2024 · 3 comments
Labels
extension: change-case Issues related to the change-case extension extension Issues related to one of the extensions in the Store feature request New feature or improvement

Comments

@Garfield-Finch
Copy link

Extension

https://www.raycast.com/erics118/change-case

Description

The current implementation of changing text to uppercase removes symbols such as . and '. Would it be a better approach to retain the symbols as they are and only adjust the case of the textual content?

Who will benefit from this feature?

All users of the Change Case Extention who change cases for sentences or paragraphs.

Anything else?

No response

@Garfield-Finch Garfield-Finch added extension Issues related to one of the extensions in the Store feature request New feature or improvement labels Dec 25, 2024
@raycastbot
Copy link
Collaborator

Thank you for opening this issue!

🔔 @erics118 @pernielsentikaer @nagauta @PWrzesinski @yug2005 you might want to have a look.

💡 Author and Contributors commands

The author and contributors of erics118/change-case can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot close as not planned Closes the issue as not planned.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.
  • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.

@raycastbot raycastbot added the extension: change-case Issues related to the change-case extension label Dec 25, 2024
@PWrzesinski
Copy link
Contributor

PWrzesinski commented Jan 2, 2025

Personally the current behavior is what I need and what I would expect, however I understand you have a different use case. It's true that the current way is more suited to software development than writing plain sentences.

I'm thinking perhaps there could be an "alternative" behavior that would work like you describe? This could be set in the extension settings or even have a different shortcut, like alt+enter. Would that cover your use case? It might require a bit of an effort, I guess all the individual transformations would have to be updated separately, because each one will probably need slightly different behavior. I mean commas and quotes are fine, but what about dashes in kebab-case and some other characters that are used to separate words? This would need to be carefully considered.

@erics118 @pernielsentikaer what do you think?

@erics118
Copy link
Contributor

erics118 commented Jan 2, 2025

This can easily be done.

This is the current behavior for upper case:

  1. convert to "no case", ie snake_case -> snake case, or KEBAB-UPPER-CASE-> kebab upper case
  2. uppercase everything (with .toUpperCase())

I can change it so that the new behavior simply just skips step 1, and uppercases everything directly. I can also add this change for lower case too. But, It would be more confusing in certain scenarios for sentence/title case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: change-case Issues related to the change-case extension extension Issues related to one of the extensions in the Store feature request New feature or improvement
Projects
None yet
Development

No branches or pull requests

4 participants