sphinx
sphinx copied to clipboard
HTML: Assign glossary terms with grouping keys to single-character groupings
Feature or Bugfix
- Bugfix
Purpose
- Group
glossaryitems by a single-character symbol instead of grouping key (when present).
Detail
- Instead of short-circuit returning the (optional)
category_key-- the entire grouping key name -- and using that as a heading to place glossary terms under, instead derive a single-character symbol fromcategory_key. - This borrows existing logic used in the
_key_func_1function.
Concerns
- I'm uncertain whether this grouping logic is valid for locales other than Latin-based scripts. In particular, there are some use cases for Katakana in the test suite that seem to indicate that glossary grouping keys are used for curated organization of index entries.
Relates
- Resolves #12707.
Screenshots
Before (en)
After (en)
Edit: fixup: I'd uploaded an incorrect after-fix sample image, containing a made-up fooon fermion in the glossary. That is now corrected.