diff --git a/ldoc.lua b/ldoc.lua index c827cfa..725c4f9 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -14,7 +14,7 @@ local lapp = require 'pl.lapp' app.require_here() local args = lapp [[ -ldoc, a documentation generator for Lua, vs 0.2 Beta +ldoc, a documentation generator for Lua, vs 0.3 Beta -d,--dir (default docs) output directory -o,--output (default 'index') output name -v,--verbose verbose @@ -447,7 +447,7 @@ local doc_path = ldoc_dir..'builtin/?.luadoc' -- ldoc -m is expecting a Lua package; this converts this to a file path if args.module then - if _G[args.file] then + if type(_G[args.file]) ~= 'table' then args.file = 'global.'..args.file end local fullpath,mod = tools.lookup_existing_module_or_function (args.file, doc_path) @@ -456,6 +456,7 @@ if args.module then else args.file = fullpath args.module = mod + print(fullpath,mod) end end