doc: Cleanup how methods are rendered in the doc.

Previously, there was some `module:foo()` or `gears.object:foo()`
because the doc used the "raw" name and/or, in some undefined and
race condition prone (due to `pairs()` order), the formatted
"classmod" name.

Now, just display `:foo()` and be done with it.
This commit is contained in:
Emmanuel Lepage Vallee 2019-06-05 17:25:29 -04:00
parent 43c851798b
commit d92fda78c4
1 changed files with 7 additions and 1 deletions

View File

@ -163,7 +163,13 @@ custom_display_name_handler = function(item, default_handler)
return default_handler(item) .. "</a> <i class=\"deprecated_label\">[deprecated]</i><a>"
end
return default_handler(item)
local ret = default_handler(item)
-- Get rid of the "module:" in front of method names. It is either wrong or
-- just redundant.
ret = ret:gsub("([^:]*)(:[^:])","%2")
return ret
end
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80