#308: allow "double" as alias for "pair" in index entries.

This commit is contained in:
Georg Brandl 2009-12-30 13:13:57 +01:00
parent 4c19161b5a
commit 93cca3d4ac
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -162,6 +162,7 @@ Index markup
.. index::
single: entry
pair: entry; pair
double: entry; double
triple: index; entry; triple
keyword: with