doc: Standardize how the @field are dsiplayed.

Always add the module name. Until now some had it and some didn't.
This commit is contained in:
Emmanuel Lepage Vallee 2019-06-07 19:17:02 -04:00
parent b4ece0f053
commit 4ce6179d78
1 changed files with 7 additions and 2 deletions

View File

@ -199,6 +199,7 @@ local add_mod = {
constructorfct = true, constructorfct = true,
staticfct = true, staticfct = true,
deprecated = true, deprecated = true,
field = true,
} }
-- Add the arguments. -- Add the arguments.
@ -225,8 +226,12 @@ custom_display_name_handler = function(item, default_handler)
-- more consistent. Right now some have their full awful.foo.bar while other -- more consistent. Right now some have their full awful.foo.bar while other
-- have "just" `bar`. Given we use constructors from metatables, we have no -- have "just" `bar`. Given we use constructors from metatables, we have no
-- choice but to use the full function name. It also makes copy/paste easier. -- choice but to use the full function name. It also makes copy/paste easier.
if add_mod[item.type] and (not ret:find(".", 1, true)) and (not ret:find(":", 1, true)) then if add_mod[item.type] then
ret = item.module.name .. "." .. ret if (not ret:find(".", 1, true)) and (not ret:find(":", 1, true)) then
ret = item.module.name .. "." .. ret
elseif item.type == "field" and ret:sub(1, #item.module.name) ~= item.module.name then
ret = item.module.name .. "." .. ret
end
end end
if item.type == "deprecated" or item.type == "deprecatedproperty" then if item.type == "deprecated" or item.type == "deprecatedproperty" then