You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the nice things with LDoc was the ability to define custom tags, so they could be used to give additional annotations.
As an example, this is the tags section of one of our projects.
custom_tags= {
{"baseclass", title="BaseClass", hidden=true},
{"state", title="State", hidden=true},
{"warns", title="Warnings", format=function(...)
return"<span class='tag-warning'>" ..markup(...) .."</span>"end},
{"bugs", title="Known Issues", format=function(...)
return"<span class='tag-bugs'>" ..markup(...) .."</span>"end},
{"deprecated", title="Deprecated", format=function(str)
ifstr=="" thenreturn"<span class='tag-deprecated'>This function is deprecated and may be removed in a future version.</span>"elsereturn"<span class='tag-deprecated'>This function is deprecated and may be removed in a future version.<br>" ..markup(str) .."</span>"endend},
{"internal", title="Internal", format=function(str)
ifstr=="" thenreturn"<span class='tag-internal'>This function is internal. Whilst you can call it, you probably shouldn't.</span>"elsereturn"<span class='tag-internal'>This function is internal. Whilst you can call it, you probably shouldn't.<br>" ..markup(str) .."</span>"endend}
}
Even if these aren't used internally, being able to define them for LuaLS to parse and export from the docs exporter in the json document would allow us to do post-processing on the files.
Activity