From: Andy Williams Date: Fri, 8 Dec 2017 18:16:51 +0000 (+0000) Subject: docs: Complete removal of object type from API URLs X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~1246 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42368d16e8b373a523d8d9301158c7512f2656e6;p=platform%2Fupstream%2Fefl.git docs: Complete removal of object type from API URLs We still have the subtypes for now, that is less likely to cause user confusion as they are unlikely to browse method names in the address bar. --- diff --git a/src/scripts/elua/apps/docgen/writer.lua b/src/scripts/elua/apps/docgen/writer.lua index 648aa54..9042c84 100644 --- a/src/scripts/elua/apps/docgen/writer.lua +++ b/src/scripts/elua/apps/docgen/writer.lua @@ -270,16 +270,14 @@ writers["dokuwiki"] = util.Object:clone { write_link = function(self, target, title) if type(target) == "table" then - if target[#target] == true then - target[#target] = nil - target = ":" .. root_nspace .. ":" - .. table.concat(target, ":") - elseif target[#target] == false then + if target[#target] == false then target[#target] = nil target = ":" .. root_nspace .. "-include:" .. table.concat(target, ":") else - target = table.concat(target, ":") + target[#target] = nil + target = ":" .. root_nspace .. ":" + .. table.concat(target, ":") end end if not title then diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua index f950d5b..04c0764 100644 --- a/src/scripts/elua/apps/gendoc.lua +++ b/src/scripts/elua/apps/gendoc.lua @@ -315,7 +315,7 @@ local build_reftable = function(f, title, ctitle, ctype, t, iscl) nt[#nt + 1] = { writer.Buffer():write_link( iscl and v:nspaces_get(true) - or dtree.Node.nspaces_get(v, ctype, true), + or dtree.Node.nspaces_get(v, true), v:full_name_get() ):finish(), v:doc_get():brief_get() @@ -1026,7 +1026,7 @@ local write_tsigs = function(f, tp, ns) end local build_alias = function(tp) - local ns = dtree.Node.nspaces_get(tp, "alias") + local ns = dtree.Node.nspaces_get(tp) local fulln = tp:full_name_get() local f = writer.Writer(ns, fulln) printgen("Generating alias: " .. fulln) @@ -1044,7 +1044,7 @@ local build_alias = function(tp) end local build_struct = function(tp) - local ns = dtree.Node.nspaces_get(tp, "struct") + local ns = dtree.Node.nspaces_get(tp) local fulln = tp:full_name_get() local f = writer.Writer(ns, fulln) printgen("Generating struct: " .. fulln) @@ -1077,7 +1077,7 @@ local build_struct = function(tp) end local build_enum = function(tp) - local ns = dtree.Node.nspaces_get(tp, "enum") + local ns = dtree.Node.nspaces_get(tp) local fulln = tp:full_name_get() local f = writer.Writer(ns, fulln) printgen("Generating enum: " .. fulln)