From d92fda78c46891b1cd44d299361e37f253187e4f Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 5 Jun 2019 17:25:29 -0400 Subject: [PATCH] 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. --- docs/config.ld | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/config.ld b/docs/config.ld index 1207cadf..790237af 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -163,7 +163,13 @@ custom_display_name_handler = function(item, default_handler) return default_handler(item) .. " [deprecated]" 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