doc: Add a `deprecatedmethod` tag.
Like all the others, but for a method.
This commit is contained in:
parent
8f71ef6dff
commit
b6214af364
|
@ -102,6 +102,8 @@ new_type("staticfct", "Static module functions", false, "Parameters")
|
|||
new_type("property", "Object properties", false, "Type constraints")
|
||||
-- Documentation for objects deprecated properties
|
||||
new_type("deprecatedproperty", "Deprecated object properties", false, "Type constraints")
|
||||
-- Documentation for objects deprecated methods
|
||||
new_type("deprecatedmethod", "Deprecated object methods", false, "Parameters")
|
||||
-- Use a custom type for the methods to bypass the faulty ldoc built-in detection.
|
||||
-- (yes, the space after Methods *is* on purpose to avoid clashing with ldoc
|
||||
-- internal "methods" concept)
|
||||
|
@ -912,6 +914,7 @@ local display_type = {
|
|||
-- Add the `-> ret_type` annotation.
|
||||
local display_return_type = {
|
||||
method = true,
|
||||
deprecatedmethod = true,
|
||||
staticfct = true,
|
||||
}
|
||||
|
||||
|
@ -924,12 +927,14 @@ local show_return = {
|
|||
staticfct = true,
|
||||
method = true,
|
||||
deprecated = true,
|
||||
deprecatedmethod = true,
|
||||
}
|
||||
|
||||
-- The different type of deprecation.
|
||||
local is_deprecated = {
|
||||
deprecated = true,
|
||||
deprecatedproperty = true,
|
||||
deprecatedmethod = true,
|
||||
deprecatedsignal = true,
|
||||
}
|
||||
|
||||
|
@ -975,12 +980,12 @@ custom_display_name_handler = function(item, default_handler)
|
|||
end
|
||||
end
|
||||
|
||||
if is_deprecated[item.type] then
|
||||
return ret .. "<i class=\"deprecated_label\"> [deprecated]</i>"
|
||||
if item.type:match("method") then
|
||||
ret = render_methods(item)
|
||||
end
|
||||
|
||||
if item.type == "method" then
|
||||
ret = render_methods(item)
|
||||
if is_deprecated[item.type] then
|
||||
return ret .. "<i class=\"deprecated_label\"> [deprecated]</i>"
|
||||
end
|
||||
|
||||
-- Get rid of the "module:" in front of method names. It is either wrong or
|
||||
|
|
Loading…
Reference in New Issue