Change-Id: I3933be04cacda3dd271c20b2248561da85a069b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159190
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Andrea Gelmini 2023-11-08 22:57:49 +01:00 committed by Julien Nabet
parent a2171ef07f
commit 641f91100a

View File

@ -54,7 +54,7 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
return [int(text) if text.isdigit() else text.lower()
for text in re.split(_nsre, s)]
# sort by both the source-line and the datatype, so the output file ordering is stable
# when we have multiple fieldds declared on the same source line
# when we have multiple fields declared on the same source line
def v_sort_key(v):
return natural_sort_key(v[1]) + [v[0]]