From 0a2b05dfbbca3b2157aece8261a9cc8ffb7720e7 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 28 May 2018 13:59:22 -0400 Subject: [PATCH] doc: Use the newer LDoc ability to use special handler for objects types The `@signal` and `@property` are now correctly rendered. The need for the extra `.` in front of the signal is no longer needed. --- docs/config.ld | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/config.ld b/docs/config.ld index a0e0a9fb..f5e3d625 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -132,4 +132,15 @@ file = { } } +custom_display_name_handler = function(item, default_handler) + + -- Remove the "namespace" from the signals and properties + if item.type == "property" or item.type == "signal" then + local name = item.name:match("%.([^.]+)$") + return name ~= "" and name or item.name + end + + return default_handler(item) +end + -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80