Fix intendation
This commit is contained in:
1 parent
76fb6b9ea7
commit
80eeb9240c
1 file changed
+14
-14
+14
-14
@@ -552,23 +552,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add non-empty groups to output
|
// Add non-empty groups to output
|
||||||
if current_entries.len() > 0 {
|
if current_entries.len() > 0 {
|
||||||
group = if group == none { "" } else { group }
|
group = if group == none { "" } else { group }
|
||||||
|
|
||||||
// sort entries by case insensitivity if requested
|
// sort entries by case insensitivity if requested
|
||||||
let sorted_entries = current_entries
|
let sorted_entries = current_entries
|
||||||
// 1. create array of tuples with (lower [if ignore-case], entry)
|
// 1. create array of tuples with (lower [if ignore-case], entry)
|
||||||
.map(e => { if ignore-case { (lower(e.short), e) } else { (e.short, e) } })
|
.map(e => { if ignore-case { (lower(e.short), e) } else { (e.short, e) } })
|
||||||
// 2. sort the tuples (by first element then second)
|
// 2. sort the tuples (by first element then second)
|
||||||
.sorted(key: t => t.first())
|
.sorted(key: t => t.first())
|
||||||
// 3. strip away the tuple's first element, leaving an array of entries
|
// 3. strip away the tuple's first element, leaving an array of entries
|
||||||
.map(t => t.last())
|
.map(t => t.last())
|
||||||
|
|
||||||
// add entries to this group's output map
|
// add entries to this group's output map
|
||||||
output.insert(group, sorted_entries)
|
output.insert(group, sorted_entries)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Render the glossary using the theme
|
// Render the glossary using the theme
|
||||||
let group_index = 0
|
let group_index = 0
|
||||||
|
|||||||
Reference in new issue
Block a user