From c6492df6131ca08a02b80a89df35e3c3d7ea603e Mon Sep 17 00:00:00 2001
From: Steven Barth <steven@midlink.org>
Date: Thu, 11 Sep 2008 01:08:46 +0000
Subject: [PATCH] UVLDoc: Fixed referencing

---
 .../luasrc/uvldoc/proto/xhtml/section.xml       | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml b/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml
index e5c4b3e667..ed85c25cce 100644
--- a/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml
+++ b/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml
@@ -3,8 +3,17 @@
 local table = require "table"
 
 function _parse_ref( r )
-	local k, v = r:match("([^.]+)%.([^.]+)")
-	return k and self:_section_filename(k, v)
+	local k, v, h = r:match("([^.]+)%.([^.]+)%.([^.]+)")
+	if not k then
+		k, v = r:match("([^.]+)%.([^.]+)")
+	end
+	if k then
+		if h then
+			return self:_variable_target(k, v, h), true
+		else
+			return self:_section_filename(k, v)
+		end
+	end
 end 
 
 function _parse_dep( r, c, s, o )
@@ -140,8 +149,8 @@ if (i==0) == v.required then
 		<ul class="variable-reference-index">
 			<% for k, d in ipairs(v.valueof) do %> 
 			<li>
-			<% local t = _parse_ref(d)
-			if t then %>Section of type <a href="<%=t%>"><% end %>
+			<% local t, x = _parse_ref(d)
+			if t then %><%=x and "Value of" or "Section of type"%> <a href="<%=t%>"><% end %>
 			<%=d%>
 			<% if t then%></a><% end %>
 			</li>