summaryrefslogtreecommitdiffstats
path: root/Utilities/Sphinx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-04 15:15:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-04 15:15:10 (GMT)
commit13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa (patch)
treef004e47cd85db33719e2cc8cd2f023803286f9cf /Utilities/Sphinx
parent44f9a69d3402c22526274d38837104b5cb9500c5 (diff)
parent607b39dc1192a9e0f7eae66f9979c399e5126337 (diff)
downloadCMake-13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa.zip
CMake-13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa.tar.gz
CMake-13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa.tar.bz2
Merge topic 'doc-mixed-case-commands'
607b39dc Utilities/Sphinx: Fix link targets for mixed-case command names
Diffstat (limited to 'Utilities/Sphinx')
-rw-r--r--Utilities/Sphinx/cmake.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py
index e20679a..5c0406d 100644
--- a/Utilities/Sphinx/cmake.py
+++ b/Utilities/Sphinx/cmake.py
@@ -201,7 +201,11 @@ class CMakeTransform(Transform):
if make_index_entry:
title = self.parse_title(env.docname)
# 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])
self.document.note_explicit_target(targetnode)
self.document.insert(0, targetnode)
@@ -220,7 +224,11 @@ class CMakeObject(ObjectDescription):
return sig
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:
signode['names'].append(targetid)
signode['ids'].append(targetid)