Add @deprecated tag to lua docs
This commit is contained in:
Vendored
+49
-1
@@ -14,7 +14,55 @@ function ldoc.url(path)
|
||||
end
|
||||
|
||||
function ldoc.realm_icon(realm)
|
||||
return "<span class=\"realm " .. (realm or "") .. "\"></span>";
|
||||
return "<span class=\"realm " .. (realm or "") .. "\"></span>"
|
||||
end
|
||||
|
||||
function ldoc.sidebar_item(item, module)
|
||||
local text = ""
|
||||
|
||||
local deprecated = item.tags.deprecated
|
||||
if deprecated then
|
||||
text = text .. "<span class=\"strikethrough\">"
|
||||
else
|
||||
text = text .. "<span>"
|
||||
end
|
||||
|
||||
text = text .. ldoc.realm_icon(item.tags.realm[1])
|
||||
text = text .. "<a href=\""
|
||||
.. ldoc.ref_to_module(module) .. "#" .. item.name
|
||||
.. "\">"
|
||||
|
||||
if ldoc.is_kind_classmethod(module.kind) then
|
||||
text = text .. item.name:gsub(".+:", "")
|
||||
else
|
||||
text = text .. item.name:gsub(module.name .. ".", "")
|
||||
end
|
||||
|
||||
text = text
|
||||
.. "</a>"
|
||||
.. "</span>"
|
||||
return text
|
||||
end
|
||||
|
||||
function ldoc.item_header(item)
|
||||
local text = ""
|
||||
|
||||
text = text .. "<a class=\"anchor\">"
|
||||
|
||||
local deprecated = item.tags.deprecated
|
||||
if deprecated then
|
||||
text = text .. "<h1 class=\"strikethrough\">"
|
||||
else
|
||||
text = text .. "<h1>"
|
||||
end
|
||||
|
||||
text = text
|
||||
.. ldoc.realm_icon(item.tags.realm[1])
|
||||
.. ldoc.display_name(item)
|
||||
.. "</h1>"
|
||||
.. "</a>"
|
||||
|
||||
return text
|
||||
end
|
||||
|
||||
function ldoc.is_kind_classmethod(kind)
|
||||
|
||||
Reference in New Issue
Block a user