#454: Add more index markup capabilities: marking see/seealso entries, and main entries for a given key.

This commit is contained in:
Georg Brandl
2011-01-07 19:00:29 +01:00
parent 98d884da6e
commit bf767d5222
21 changed files with 228 additions and 145 deletions

View File

@@ -277,6 +277,8 @@ Index markup
double: entry; double
triple: index; entry; triple
keyword: with
see: from; to
seealso: fromalso; toalso
Invalid index markup...
@@ -285,6 +287,11 @@ Invalid index markup...
pair:
keyword:
.. index::
!Main, !Other
!single: entry; pair
:index:`!Main`
.. _ölabel:

View File

@@ -49,7 +49,7 @@ http://sphinx.pocoo.org/domains.html
HTML_WARNINGS = ENV_WARNINGS + """\
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
%(root)s/markup.txt:: WARNING: invalid index entry u''
%(root)s/markup.txt:: WARNING: invalid single index entry u''
%(root)s/markup.txt:: WARNING: invalid pair index entry u''
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '
"""
@@ -232,6 +232,14 @@ HTML_XPATH = {
'_static/statictmpl.html': [
(".//project", 'Sphinx <Tests>'),
],
'genindex.html': [
# index entries
(".//a/strong", "Main"),
(".//a/strong", "[1]"),
(".//a/strong", "Other"),
(".//a", "entry"),
(".//dt/a", "double"),
]
}
if pygments:

View File

@@ -30,6 +30,7 @@ latex_warnfile = StringIO()
LATEX_WARNINGS = ENV_WARNINGS + """\
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
WARNING: invalid pair index entry u''
WARNING: invalid pair index entry u'keyword; '
"""
if sys.version_info >= (3, 0):