krasa / StringManipulation

IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162
Apache License 2.0
694 stars 81 forks source link

Weird sorting of zero between brackets/braces #195

Open sbertault opened 1 year ago

sbertault commented 1 year ago

Describe the bug When between square brackets or curly braces (but not parens) zero is ranked after nine instead of before one.

To Reproduce Steps to reproduce the behavior:

  1. Create new scratch file of type plain text
  2. type in the following lines :
    9
    0
    1
    a[9]
    a[0]
    a[1]
  3. select all
  4. String Manipulations > Sort Lines > Case Sensitive + Normal Sort + Natural Order Comparrator > OK
  5. the order is now
    0
    1
    9
    a[1]
    a[9]
    a[0]

Environment : String Manipulation v 9.5.0

IntelliJ IDEA 2022.1.2 (Ultimate Edition) Build #IU-221.5787.30, built on May 31, 2022 Runtime version: 11.0.15+10-b2043.56 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

OS : Linux Debian 11 Locale LANG=fr_FR.UTF-8