q66 pushed a commit to branch master. http://git.enlightenment.org/tools/edocgen.git/commit/?id=66c1ebe2aa7878d6ffe3da30255d4c12349675c2
commit 66c1ebe2aa7878d6ffe3da30255d4c12349675c2 Author: Daniel Kolesa <[email protected]> Date: Fri Nov 15 16:18:48 2019 +0100 writer: support different title/heading sets This also prevents an issue with classes having double titles. --- docgen/writer.lua | 4 ++-- gendoc.lua | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docgen/writer.lua b/docgen/writer.lua index af24257..a3af6ad 100644 --- a/docgen/writer.lua +++ b/docgen/writer.lua @@ -149,7 +149,7 @@ writers["dokuwiki"] = util.Object:clone { INCLUDE_NAMESPACE = 2, INCLUDE_TAG = 3, - __ctor = function(self, path, title) + __ctor = function(self, path, title, heading) local subs if type(path) == "table" then subs = dutil.path_join(unpack(path)) @@ -163,7 +163,7 @@ writers["dokuwiki"] = util.Object:clone { self:write_raw("~~Title: ", title, "~~") self:write_nl() end - self:write_h(title, 1) + self:write_h(heading or title, 1) end end, diff --git a/gendoc.lua b/gendoc.lua index b0e687d..96aa705 100644 --- a/gendoc.lua +++ b/gendoc.lua @@ -415,10 +415,9 @@ end local build_class = function(cl) local cln = eoutils.obj_nspaces_get(cl) local fulln = cl:name_get() - local f = writer.Writer(cln, fulln) + local f = writer.Writer(cln, fulln, fulln .. + " (" .. eoutils.class_type_str_get(cl) .. ")") printgen("Generating class: " .. fulln) - - f:write_h(cl:name_get() .. " (" .. eoutils.class_type_str_get(cl) .. ")", 1) f:write_h("Description", 2) f:write_raw(docm.full_str_get(eos, cl:documentation_get(), nil, true)) --
