ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

'custom_tags' Not Working

Open AntumDeluge opened this issue 6 years ago • 2 comments

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

AntumDeluge avatar Feb 14 '19 17:02 AntumDeluge

Found out that at least part of my problem was when I was using ./ for the file argument:

$ ldoc .  # works

$ ldoc ./ # doesn't work

AntumDeluge avatar Feb 15 '19 01:02 AntumDeluge

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

LobbyDivinus avatar Mar 03 '21 11:03 LobbyDivinus