ldoc
ldoc copied to clipboard
'custom_tags' Not Working
For some reason my 'custom_tags' are not working. I swear I've been able to do this before. Probably something I am doing wrong.
config.ld:
dir = 'docs'
not_luadoc = true
-- custom types
new_type('setting', 'Settings')
-- custom tags
custom_tags = {
{
'settype',
title = 'Type',
},
}
test.lua:
--- A test module.
--
-- @module test.lua
--- A test function.
--
-- @function tPrint
-- @tparam string foo
local function tPrint(foo)
print('Test function: ' .. foo)
end
--- A custom type
--
-- @setting tSet
-- @settype boolean
local tSet = true
output:
$ ldoc test.lua
reading configuration from ./config.ld
./test.lua:17: ?: unknown tag: 'settype' nil
output written to ./docs
Found out that at least part of my problem was when I was using ./
for the file argument:
$ ldoc . # works
$ ldoc ./ # doesn't work
Stumbled accross the same issue. For me using the -c option to specify the path to the config.ld file directly solved the issue (although ldoc outputted that it was using the same file before).
$ ldoc src -c src/config.ld # just "ldoc src" didn't work