natorder icon indicating copy to clipboard operation
natorder copied to clipboard

Small example that acts weird

Open jsmedn opened this issue 3 years ago • 3 comments

Hi

This example doesn't come out as expected: Unsorted: "B4S B", "B4A B", "B4 B" Sorted: "B4A B", "B4 B", "B4S B" Expected: "B4 B", "B4A B", "B4S B"

I'm guessing it compares A in "B4A B" to B in "B4 B".

jsmedn avatar Feb 25 '22 08:02 jsmedn

#12 ?

krasa avatar Feb 25 '22 09:02 krasa

I guess they could be solved as one ticket, but ignoring whitespace between digits only would fail in this example. It would have to ignore whitespace between word-digit and digit-digit, but not digit-word or word-word. So in the case above it would have to compare: [B, 4, ' ', B] to [B, 4, A, ' ', B]

jsmedn avatar Feb 25 '22 10:02 jsmedn

It would be best to have the ignoring configurable for all those cases.

krasa avatar Feb 25 '22 10:02 krasa