From df7d55c22f6a184a660b2825c242ea307a3bc223 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Wed, 9 Oct 2019 16:24:01 +0200 Subject: [PATCH] do not use placeholder description text from api --- docgen/doc.lua | 6 ++---- gendoc.lua | 6 +++--- templates/include/reftable.txt | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docgen/doc.lua b/docgen/doc.lua index 6ca6444..1695ca6 100644 --- a/docgen/doc.lua +++ b/docgen/doc.lua @@ -116,7 +116,7 @@ end M.brief_str_get = function(eos, obj, obj2) if not obj and not obj2 then - return "No description supplied." + return nil end if not obj then obj = obj2 @@ -211,9 +211,7 @@ M.impl_description_get = function(eos, impl, cl) else bdoc = M.brief_str_get(eos, docf) end - if bdoc ~= "No description supplied." then - return bdoc - end + return bdoc end local nspaces_group = function(ns) diff --git a/gendoc.lua b/gendoc.lua index fff24ff..b0e687d 100644 --- a/gendoc.lua +++ b/gendoc.lua @@ -48,7 +48,7 @@ local build_reftable = function(f, title, t) eoutils.obj_nspaces_get(v, true), v:name_get() ):finish(), - docm.brief_str_get(eos, v:documentation_get()) + docm.brief_str_get(eos, v:documentation_get()) or "No description supplied." } end table.sort(nt, function(v1, v2) return v1[1] < v2[1] end) @@ -352,7 +352,7 @@ local write_evtable = function(f, tcl, tbl) -- description local bdoc = docm.brief_str_get(eos, ev:documentation_get()) - if bdoc ~= "No description supplied." then + if bdoc then f:write_br(true) f:write_raw("> ") f:write_raw(bdoc) @@ -403,7 +403,7 @@ local write_inherit_evtable = function(f, tcl, tbl) f:write_raw(" | ") local bdoc = docm.brief_str_get(eos, ev:documentation_get()) - if bdoc ~= "No description supplied." then + if bdoc then f:write_raw(bdoc) end diff --git a/templates/include/reftable.txt b/templates/include/reftable.txt index 345378e..66db018 100644 --- a/templates/include/reftable.txt +++ b/templates/include/reftable.txt @@ -7,6 +7,7 @@ "[[" .. doc.link_target_get(eoutils.obj_nspaces_get(v)) .. "|" .. v:name_get() .. "]]", doc.brief_str_get(eos, v:documentation_get()) + or "No description supplied." } end return cnt