From 1fd045904e94d68878b3a5f748bf20f7c61a1cf7 Mon Sep 17 00:00:00 2001 From: ilya-g Date: Fri, 17 Feb 2023 16:42:28 +0100 Subject: Consistent alphabetical order of element groups in index and navigation (#2861) * Sort groups of divergent elements by their key first ignoring case, then preserving it * Add tests for sorting groups and navigation --- plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt (limited to 'plugins/base/src/main/kotlin/utils') diff --git a/plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt b/plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt new file mode 100644 index 00000000..68b9cde8 --- /dev/null +++ b/plugins/base/src/main/kotlin/utils/alphabeticalOrder.kt @@ -0,0 +1,7 @@ +package org.jetbrains.dokka.base.utils + + +/** + * Canonical alphabetical order to sort named elements + */ +internal val canonicalAlphabeticalOrder: Comparator = String.CASE_INSENSITIVE_ORDER.thenBy { it } \ No newline at end of file -- cgit