stevedonovan/LDoc — pull request #116 by abadc0de (2013-11-28 01:13:20+00:00)
Title: Custom tags

Custom tags. Add them to config.ld like this:

custom_tags = {
{ name = 'path', title = 'Resource path',
format = function(v)
return '

' .. v:gsub('^%s-(%w+)', '%1') .. '

'
end
} ,
}

This is a quick way to get ldoc to recognize arbitrary tags and document them just after the item description. All tags are registered as multiline for now, but this could be improved later.

`custom_tags` is a numeric table containing tables with keys:
- `name`: The tag name
- `title` (optional): An the label for the h3, like "Parameters"
- `format` (optional): A function to format the tag's value