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

internal/colltab: improve numeric sorting #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 7, 2024

  1. x/text/internal/colltab: Avoid using Elem.Primary() == 0 in numeric.go

    Elem.Primary() == 0 has odd ordering properties, starting at 1 allows 0
      to consistently be ordered before other numbers when non-numeric text
      follows a 0
      Also fixes an issue comparing numbers > 269 characters with
      numbers < 270 characters
    
    Fixes golang/go#25554
    lordwelch committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c25a7be View commit details
    Browse the repository at this point in the history
  2. x/text/internal/colltab: Sort numbers with leading zeros

    Makes numeric sorting deterministic. Particularly useful for
      approximating how an OS file manager will sort files.
    lordwelch committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ce407f2 View commit details
    Browse the repository at this point in the history