Merge branch 'doc-mixed-case-commands' into release

This commit is contained in:
Brad King 2014-12-04 10:04:29 -05:00
commit c2d371034e
1 changed files with 10 additions and 2 deletions

View File

@ -201,7 +201,11 @@ class CMakeTransform(Transform):
if make_index_entry: if make_index_entry:
title = self.parse_title(env.docname) title = self.parse_title(env.docname)
# Insert the object link target. # Insert the object link target.
targetid = '%s:%s' % (objtype, title) if objtype == 'command':
targetname = title.lower()
else:
targetname = title
targetid = '%s:%s' % (objtype, targetname)
targetnode = nodes.target('', '', ids=[targetid]) targetnode = nodes.target('', '', ids=[targetid])
self.document.note_explicit_target(targetnode) self.document.note_explicit_target(targetnode)
self.document.insert(0, targetnode) self.document.insert(0, targetnode)
@ -220,7 +224,11 @@ class CMakeObject(ObjectDescription):
return sig return sig
def add_target_and_index(self, name, sig, signode): def add_target_and_index(self, name, sig, signode):
targetid = '%s:%s' % (self.objtype, name) if self.objtype == 'command':
targetname = name.lower()
else:
targetname = name
targetid = '%s:%s' % (self.objtype, targetname)
if targetid not in self.state.document.ids: if targetid not in self.state.document.ids:
signode['names'].append(targetid) signode['names'].append(targetid)
signode['ids'].append(targetid) signode['ids'].append(targetid)