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

Natural sorting library we use doesn't put whitespace as more important than alphanumerics #5634

Closed
mkruselj opened this issue Dec 15, 2021 · 3 comments · Fixed by #5791
Closed
Labels
Bug Report Item submitted using the Bug Report template UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc.
Milestone

Comments

@mkruselj
Copy link
Collaborator

In Surge:

image

In OS (Explorer in this case):

image

@mkruselj mkruselj added UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc. Bug Report Item submitted using the Bug Report template labels Dec 15, 2021
@baconpaul
Copy link
Collaborator

ugh so i see why this happens but it is rather painful to fix. basically the compare is ignoring spaces to strip leading spaces so that foo 2 is less than foo 1

but that means that Scream Lead ends up comparing as ScreamLead

i need to think about how to fix this.

@baconpaul
Copy link
Collaborator

I think (think) the fix is consecutive spaces become one space rather than spaces are stripped.

need to write some good tests here though.

@baconpaul
Copy link
Collaborator

Screen Shot 2022-01-18 at 3 35 05 PM

baconpaul added a commit to baconpaul/surge that referenced this issue Jan 18, 2022
StrNat would strip all spaces. We want it to strip leading
spaces and *consecutive* internal spaces but not *semantic*
internal spaces. So modify accordingly.

Closes surge-synthesizer#5634
@baconpaul baconpaul added the Resolved Issues that have been resolved, but not merged - usually only used directly after a release label Jan 19, 2022
baconpaul added a commit that referenced this issue Jan 22, 2022
StrNat would strip all spaces. We want it to strip leading
spaces and *consecutive* internal spaces but not *semantic*
internal spaces. So modify accordingly.

Closes #5634
@mkruselj mkruselj removed the Resolved Issues that have been resolved, but not merged - usually only used directly after a release label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants