summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRoman Rakus <rrakus@redhat.com>2013-08-22 15:26:12 +0200
committerRoman Rakus <rrakus@redhat.com>2013-08-22 15:34:24 +0200
commit25fa62a6c2d756da9203f62078068d00e2728dc1 (patch)
treece245dce2a43cd28a042ab514ac433c7cf47a469 /tools
parent65a8def89babf3d9db60e5efb29b849e8925fc67 (diff)
downloadopenlmi-providers-25fa62a6c2d756da9203f62078068d00e2728dc1.tar.gz
openlmi-providers-25fa62a6c2d756da9203f62078068d00e2728dc1.tar.xz
openlmi-providers-25fa62a6c2d756da9203f62078068d00e2728dc1.zip
tools: Create correct reference for arrays
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/openlmi-doc-class2rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/openlmi-doc-class2rst b/tools/openlmi-doc-class2rst
index 81a0e23..bbcf023 100755
--- a/tools/openlmi-doc-class2rst
+++ b/tools/openlmi-doc-class2rst
@@ -93,7 +93,10 @@ class HtmlExporter(object):
if isinstance(param, (konkretmof.MOF_Property_Decl, konkretmof.MOF_Parameter)) and param.array_index != 0:
ptype = ptype + "[]"
if url:
- ptype = ":ref:`%s <%s>`" % (ptype, self.link(ptype))
+ if ptype.endswith("[]"):
+ ptype = ":ref:`%s <%s>`" % (ptype, self.link(ptype[:-2]))
+ else:
+ ptype = ":ref:`%s <%s>`" % (ptype, self.link(ptype))
else:
ptype = "``" + ptype + "``"
return ptype