biati-digital / nova-text-tools

Swiss Army knife for text manipulation and selection Sort, Transform, Filter, Delete Duplicates, Encode, Decode and much more...
16 stars 2 forks source link

Fix "Make Camel Case" on disjointed multiple selection #11

Closed guillaumealgis closed 1 year ago

guillaumealgis commented 2 years ago

When applying text transformation on multiple blocks of texts, the result is buggy.

Here's a video of me trying to apply a transformation (snake case to camel case) on multiple chunks all at once (buggy) then one by one (works fine, but tedious process) :

https://user-images.githubusercontent.com/1041337/165988746-53c76bf4-3e6d-42b3-9bf1-5a839bf8b60d.mov

biati-digital commented 2 years ago

I'm pretty sure that used to work, the extension should supports multiple selections without problems, probably a Nova update changed something, could not check before as our license expired months ago but we have a sponsor an a renewed license. I'll take a look as soon as i've some free time.

biati-digital commented 2 years ago

I'm taking a look at this but i'm not able to replicate, i updated to the latest Nova version before testing it so i'm not sure if they changed something. If you are able to replicate please share the code so i can copy paste and try it.

biati-digital commented 2 years ago

If you are still having problems please feel free to post the code, i'll close this in the meantime.

guillaumealgis commented 2 years ago

Just tested with Nova 9.4 Build 429162, same problem.

Here's the file I'm testing on :

{
  "a_cool_snake_key": "Snake!",
  "some_other_key": 42,
  "and_another_one": "What a great example"
}

I'm selecting the 3 keys one by one by double-clicking the text while holding the option key, then Cmd+Maj+P and selecting "Make Camel Case".

biati-digital commented 2 years ago

Ok, the problem is not with multiple selections, the extension already supports multiple selections, i tried your code with several commands like uppercase, lowercase, param case, dot case, etc. Seems that the only one having problems is camel case, i'll reopen this and investigate as soon as i've some free time.

https://user-images.githubusercontent.com/1219228/185051872-f5a2ad8a-92a2-4442-afe3-b3d123dd3f98.mp4

biati-digital commented 1 year ago

This has been fixed in the latest version 3.0.9