Fix minor issues with certificate lists
authorJan Dittberner <jandd@cacert.org>
Sat, 7 May 2016 20:43:52 +0000 (22:43 +0200)
committerJan Dittberner <jandd@cacert.org>
Sat, 7 May 2016 20:43:52 +0000 (22:43 +0200)
This commit fixes a grammar error in the certlist error handling and
creates paired index entries for certificates instead of single ones.

docs/sphinxext/cacert.py

index aa728f3..7c30dd0 100644 (file)
@@ -298,8 +298,8 @@ def process_sslcerts(app, doctree):
     for node in doctree.traverse(sslcertlist_node):
         if hasattr(env, 'cacert_certlistdoc'):
             raise SphinxError(
-                "There must only be one sslcertlist directive present in "
-                "the document tree.")
+                "There must be one sslcertlist directive present in "
+                "the document tree only.")
         env.cacert_certlistdoc = env.docname
 
     for node in doctree.traverse(sslcert_node):
@@ -342,7 +342,7 @@ def process_sslcerts(app, doctree):
         if 'altnames' in certdata:
             info['altnames'] = certdata['altnames'].copy()
         indexnode = addnodes.index(entries=[
-            ('single', _get_cert_index_text(info), targetnode['ids'][0],
+            ('pair', _get_cert_index_text(info), targetnode['ids'][0],
              '', None)
         ])
 
@@ -479,7 +479,7 @@ def process_sslcert_nodes(app, doctree, docname):
             )
             cert_sec += nodes.title(text=cert_info['cn'])
             indexnode = addnodes.index(entries=[
-                ('single', _get_cert_index_text(cert_info),
+                ('pair', _get_cert_index_text(cert_info),
                  cert_sec['ids'][0], '', None),
             ])
             content.append(indexnode)