UVLDoc: Fixed referencing
This commit is contained in:
parent
c8ef012b3a
commit
c6492df613
1 changed files with 13 additions and 4 deletions
|
@ -3,8 +3,17 @@
|
||||||
local table = require "table"
|
local table = require "table"
|
||||||
|
|
||||||
function _parse_ref( r )
|
function _parse_ref( r )
|
||||||
local k, v = r:match("([^.]+)%.([^.]+)")
|
local k, v, h = r:match("([^.]+)%.([^.]+)%.([^.]+)")
|
||||||
return k and self:_section_filename(k, v)
|
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
|
end
|
||||||
|
|
||||||
function _parse_dep( r, c, s, o )
|
function _parse_dep( r, c, s, o )
|
||||||
|
@ -140,8 +149,8 @@ if (i==0) == v.required then
|
||||||
<ul class="variable-reference-index">
|
<ul class="variable-reference-index">
|
||||||
<% for k, d in ipairs(v.valueof) do %>
|
<% for k, d in ipairs(v.valueof) do %>
|
||||||
<li>
|
<li>
|
||||||
<% local t = _parse_ref(d)
|
<% local t, x = _parse_ref(d)
|
||||||
if t then %>Section of type <a href="<%=t%>"><% end %>
|
if t then %><%=x and "Value of" or "Section of type"%> <a href="<%=t%>"><% end %>
|
||||||
<%=d%>
|
<%=d%>
|
||||||
<% if t then%></a><% end %>
|
<% if t then%></a><% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue