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.
This commit is contained in:
Andy Williams 2017-12-08 18:16:51 +00:00
parent 3cccf56795
commit 42368d16e8
2 changed files with 8 additions and 10 deletions

View File

@ -270,16 +270,14 @@ writers["dokuwiki"] = util.Object:clone {
write_link = function(self, target, title) write_link = function(self, target, title)
if type(target) == "table" then if type(target) == "table" then
if target[#target] == true then if target[#target] == false then
target[#target] = nil
target = ":" .. root_nspace .. ":"
.. table.concat(target, ":")
elseif target[#target] == false then
target[#target] = nil target[#target] = nil
target = ":" .. root_nspace .. "-include:" target = ":" .. root_nspace .. "-include:"
.. table.concat(target, ":") .. table.concat(target, ":")
else else
target = table.concat(target, ":") target[#target] = nil
target = ":" .. root_nspace .. ":"
.. table.concat(target, ":")
end end
end end
if not title then if not title then

View File

@ -315,7 +315,7 @@ local build_reftable = function(f, title, ctitle, ctype, t, iscl)
nt[#nt + 1] = { nt[#nt + 1] = {
writer.Buffer():write_link( writer.Buffer():write_link(
iscl and v:nspaces_get(true) 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() v:full_name_get()
):finish(), ):finish(),
v:doc_get():brief_get() v:doc_get():brief_get()
@ -1026,7 +1026,7 @@ local write_tsigs = function(f, tp, ns)
end end
local build_alias = function(tp) 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 fulln = tp:full_name_get()
local f = writer.Writer(ns, fulln) local f = writer.Writer(ns, fulln)
printgen("Generating alias: " .. fulln) printgen("Generating alias: " .. fulln)
@ -1044,7 +1044,7 @@ local build_alias = function(tp)
end end
local build_struct = function(tp) 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 fulln = tp:full_name_get()
local f = writer.Writer(ns, fulln) local f = writer.Writer(ns, fulln)
printgen("Generating struct: " .. fulln) printgen("Generating struct: " .. fulln)
@ -1077,7 +1077,7 @@ local build_struct = function(tp)
end end
local build_enum = function(tp) 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 fulln = tp:full_name_get()
local f = writer.Writer(ns, fulln) local f = writer.Writer(ns, fulln)
printgen("Generating enum: " .. fulln) printgen("Generating enum: " .. fulln)