tera icon indicating copy to clipboard operation
tera copied to clipboard

Add a case_sensitive attribute to the sort filter

Open slatian opened this issue 2 years ago • 0 comments

A feature request.

When sorting strings sometimes one doesn't care whether a letter is uppercase or lowercase just that the 'a's are near the 'A's.

The current behavior of sort is that it sorts (for Latin at least) Uppercase before lowercase:

  • A_1
  • B_3
  • a_2

When someone would implement this the resulting sort(case_sensitive=false) would sort as if the attribute to sort by was ran through a lowercase filter first:

  • A_1
  • a_2
  • B_3

If that is too complex for the current version of tera because of implementation details I'm not aware of please consider it for the v2 wishlist.

Note: the unique filter already has such a flag.

slatian avatar May 28 '23 18:05 slatian