doc(@hidden;ldoc.ltp): Add ldoc tag to hide item
Add a new ldoc tag `@hidden`. This tag allows us to keep documentation for magic methods (e.g. `wibox.widget.base:get_visible`) but prevent it from being part of the documentation used by final users.
This commit is contained in:
parent
20a8d902c5
commit
af3b194a31
|
@ -462,7 +462,16 @@ add_custom_tag {
|
||||||
-- @supermodule supermodule
|
-- @supermodule supermodule
|
||||||
add_custom_tag {
|
add_custom_tag {
|
||||||
name = "supermodule",
|
name = "supermodule",
|
||||||
hiden = true,
|
hidden = true,
|
||||||
|
auto_subtags = false
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Mark the item ad hidden.
|
||||||
|
-- This tag should be used to hide items from the documentation.
|
||||||
|
-- @hidden
|
||||||
|
add_custom_tag {
|
||||||
|
name = "hidden",
|
||||||
|
hidden = true,
|
||||||
auto_subtags = false
|
auto_subtags = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
# for kind,items in module.kinds() do
|
# for kind,items in module.kinds() do
|
||||||
# local myitems = {}
|
# local myitems = {}
|
||||||
# for item in items() do
|
# for item in items() do
|
||||||
# myitems[#myitems + 1] = item
|
# myitems[#myitems + 1] = item
|
||||||
# end
|
# end
|
||||||
# all_module_kinds[#all_module_kinds + 1] = { kind = kind, items = myitems }
|
# all_module_kinds[#all_module_kinds + 1] = { kind = kind, items = myitems }
|
||||||
# end
|
# end
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
|
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
# end
|
# end
|
||||||
# for item in iter(k.items) do
|
# for item in iter(k.items) do if not item.tags.hidden then
|
||||||
# local dn = display_name(item)
|
# local dn = display_name(item)
|
||||||
# local inherited = item.inherited or (item.baseclass ~= module.name)
|
# local inherited = item.inherited or (item.baseclass ~= module.name)
|
||||||
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
|
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
</td>
|
</td>
|
||||||
# end
|
# end
|
||||||
</tr>
|
</tr>
|
||||||
# end -- for items
|
# end end -- for items
|
||||||
# last_kind = kind
|
# last_kind = kind
|
||||||
#end -- for kinds
|
#end -- for kinds
|
||||||
</table>
|
</table>
|
||||||
|
@ -319,7 +319,7 @@
|
||||||
# if not kind:match("^ldoc_skip") then
|
# if not kind:match("^ldoc_skip") then
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
# end
|
# end
|
||||||
# for item in iter(k.items) do
|
# for item in iter(k.items) do if not item.tags.hidden then
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "$(item.name)"></a>
|
<a name = "$(item.name)"></a>
|
||||||
<strong>$(display_name(item))</strong>
|
<strong>$(display_name(item))</strong>
|
||||||
|
@ -479,7 +479,7 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
# end -- for items
|
# end end -- for items
|
||||||
# last_kind = kind
|
# last_kind = kind
|
||||||
# end -- for kinds
|
# end -- for kinds
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Reference in New Issue