Add @deprecated tag to lua docs
This commit is contained in:
@@ -34,6 +34,7 @@ pretty_topic_names = true -- strips extension from manual filenames, this does n
|
|||||||
|
|
||||||
custom_tags = {
|
custom_tags = {
|
||||||
{"realm", hidden = true},
|
{"realm", hidden = true},
|
||||||
|
{"deprecated", hidden = true},
|
||||||
{"internal", hidden = true}
|
{"internal", hidden = true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -537,3 +537,7 @@ a.type {
|
|||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
padding: 0 8px 0 8px;
|
padding: 0 8px 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.strikethrough {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|||||||
Vendored
+49
-1
@@ -14,7 +14,55 @@ function ldoc.url(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ldoc.realm_icon(realm)
|
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
|
end
|
||||||
|
|
||||||
function ldoc.is_kind_classmethod(kind)
|
function ldoc.is_kind_classmethod(kind)
|
||||||
|
|||||||
Vendored
+8
-3
@@ -40,9 +40,14 @@
|
|||||||
{% for item, _ in pairs(items) do %}
|
{% for item, _ in pairs(items) do %}
|
||||||
<section class="method" id="{{item.name}}">
|
<section class="method" id="{{item.name}}">
|
||||||
<header>
|
<header>
|
||||||
<a class="anchor">
|
{* ldoc.item_header(item) *}
|
||||||
<h1>{* ldoc.realm_icon(item.tags.realm[1]) *}</span>{{ldoc.display_name(item)}}</h1>
|
|
||||||
</a>
|
{% if item.tags.deprecated then %}
|
||||||
|
<div class="notice warning">
|
||||||
|
<div class="title">Deprecated</div>
|
||||||
|
<p>This API is deprecated and shouldn't be used anymore.</p>
|
||||||
|
</div>
|
||||||
|
{% end %}
|
||||||
|
|
||||||
{% if (item.tags.internal) then %}
|
{% if (item.tags.internal) then %}
|
||||||
<div class="notice error">
|
<div class="notice error">
|
||||||
|
|||||||
Vendored
+2
-16
@@ -59,14 +59,7 @@ end
|
|||||||
{% for k, v in pairs(currentMod.items) do %}
|
{% for k, v in pairs(currentMod.items) do %}
|
||||||
{% if (v.kind == "functions") then %}
|
{% if (v.kind == "functions") then %}
|
||||||
<li>
|
<li>
|
||||||
{* ldoc.realm_icon(v.tags.realm[1]) *}
|
{* ldoc.sidebar_item(v, currentMod) *}
|
||||||
<a href="{* ldoc.ref_to_module(currentMod) *}#{{v.name}}">
|
|
||||||
{% if (ldoc.is_kind_classmethod(currentMod.kind)) then
|
|
||||||
echo((v.name:gsub(".+:", "")))
|
|
||||||
else
|
|
||||||
echo((v.name:gsub(currentMod.name .. ".", "")))
|
|
||||||
end %}
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -90,14 +83,7 @@ end
|
|||||||
{% for k, v in pairs(currentMod.items) do %}
|
{% for k, v in pairs(currentMod.items) do %}
|
||||||
{% if (v.kind == "fields" or v.kind == "tables") then %}
|
{% if (v.kind == "fields" or v.kind == "tables") then %}
|
||||||
<li>
|
<li>
|
||||||
{* ldoc.realm_icon(v.tags.realm[1]) *}
|
{* ldoc.sidebar_item(v, currentMod) *}
|
||||||
<a href="{* ldoc.ref_to_module(currentMod) *}#{{v.name}}">
|
|
||||||
{% if (ldoc.is_kind_classmethod(currentMod.kind)) then
|
|
||||||
echo((v.name:gsub(".+:", "")))
|
|
||||||
else
|
|
||||||
echo((v.name:gsub(currentMod.name .. ".", "")))
|
|
||||||
end %}
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|||||||
Reference in New Issue
Block a user