Use classes for formatting argument descriptions rather than tags
This commit is contained in:
parent
9924e4dced
commit
2b304a2252
|
@ -109,9 +109,9 @@ function html.generate_output(ldoc, args, project)
|
|||
for name in tp:gmatch("[^|]+") do
|
||||
local ref,err = markup.process_reference(name)
|
||||
if ref then
|
||||
types[#types+1] = ('<a href="%s">%s</a> '):format(ldoc.href(ref),name)
|
||||
types[#types+1] = ('<a class="type" href="%s">%s</a>'):format(ldoc.href(ref),name)
|
||||
else
|
||||
types[#types+1] = '<strong>'..name..'</strong> '
|
||||
types[#types+1] = '<span class="type">'..name..'</span>'
|
||||
end
|
||||
end
|
||||
local names = table.concat(types, ", ", 1, math.max(#types-1, 1))
|
||||
|
|
|
@ -73,6 +73,11 @@ body {
|
|||
}
|
||||
|
||||
code, tt { font-family: monospace; }
|
||||
span.parameter { font-family:monospace; }
|
||||
span.parameter:after { content:":"; }
|
||||
span.types:before { content:"("; }
|
||||
span.types:after { content:")"; }
|
||||
.type { font-weight: bold; font-style:italic }
|
||||
|
||||
body, p, td, th { font-size: .95em; line-height: 1.2em;}
|
||||
|
||||
|
|
|
@ -140,8 +140,12 @@ return [==[
|
|||
<h3>$(module.kinds:type_of(item).subnames):</h3>
|
||||
<ul>
|
||||
# for p in iter(item.params) do
|
||||
<li><span class="parameter">$(p)</span>
|
||||
# local tp = ldoc.typename(item:type_of_param(p))
|
||||
<li><code><em>$(p)</em></code>: $(tp)$(M(item.params[p],item))</li>
|
||||
# if tp ~= '' then
|
||||
<span class="types">$(tp)</span>
|
||||
# end
|
||||
$(M(item.params[p],item))</li>
|
||||
# end -- for
|
||||
</ul>
|
||||
# end -- if params
|
||||
|
@ -161,8 +165,12 @@ return [==[
|
|||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
# for i,r in ldoc.ipairs(item.ret) do
|
||||
$(li)
|
||||
# local tp = ldoc.typename(item:type_of_ret(i))
|
||||
$(li)$(tp)$(M(r,item))$(il)
|
||||
# if tp ~= '' then
|
||||
<span class="types">$(tp)</span>
|
||||
# end
|
||||
$(M(r,item))$(il)
|
||||
# end -- for
|
||||
</ol>
|
||||
# end -- if returns
|
||||
|
|
Loading…
Reference in New Issue