mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#308: allow "double" as alias for "pair" in index entries.
This commit is contained in:
parent
4c19161b5a
commit
93cca3d4ac
@ -235,7 +235,7 @@ class Index(Directive):
|
||||
option_spec = {}
|
||||
|
||||
indextypes = [
|
||||
'single', 'pair', 'triple',
|
||||
'single', 'pair', 'double', 'triple',
|
||||
]
|
||||
|
||||
def run(self):
|
||||
@ -259,6 +259,8 @@ class Index(Directive):
|
||||
for type in self.indextypes:
|
||||
if entry.startswith(type+':'):
|
||||
value = entry[len(type)+1:].strip()
|
||||
if type == 'double':
|
||||
type = 'pair'
|
||||
ne.append((type, value, targetid, value))
|
||||
break
|
||||
# shorthand notation for single entries
|
||||
|
@ -162,6 +162,7 @@ Index markup
|
||||
.. index::
|
||||
single: entry
|
||||
pair: entry; pair
|
||||
double: entry; double
|
||||
triple: index; entry; triple
|
||||
keyword: with
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user