diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-11-02 13:00:45 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-11-02 13:00:45 -0400 |
| commit | a793150e96506a3043d792e29627b633499aa6a3 (patch) | |
| tree | e36a404bb835a443e75bdee7df3264a56d0c9c56 | |
| parent | 84f30a290e3e0dfdf47a00f5ff9c0d57bcba6397 (diff) | |
| download | artery-a793150e96506a3043d792e29627b633499aa6a3.tar.gz artery-a793150e96506a3043d792e29627b633499aa6a3.tar.bz2 artery-a793150e96506a3043d792e29627b633499aa6a3.zip | |
Methods can mark domain
Added documentation settings that lets functions mark themselves as
@domain client
@domain shared
@domain server
| -rw-r--r-- | config.ld | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -13,8 +13,8 @@ file = { } format = 'markdown' sort_modules = true -new_type("concommand","Console commands", true) -new_type("metamethod","Meta Methods", true) +--[[new_type("concommand","Console commands", true) +new_type("metamethod","Meta Methods", true)]] new_type("server","Server Modules", true) new_type("client","Client Modules", true) @@ -23,26 +23,31 @@ new_type("shared","Shared Modules", true) new_type("tutorial","Tutorials",true) custom_tags = { {'reqadmin', hidden=false}, + {"domain", hidden=false}, } -custom_display_name_handler = function(item,default_handeler) +custom_display_name_handler = function(item,default_handler) + local decorators = {} + local decorate = { + reqadmin = function(key,name) return string.format(" %s <em class=\"reqadmin\">Requires Admin</em>",name) end, + domain = function(key,name) return "<span class=\"domain-".. key[1] .. "\">[" .. key[1] .. "]</span>" .. name end, + } if item.type == "concommand" then if item.tags.reqadmin then for k,v in pairs(item) do print(k,":",v) end - return item.name .. " <em class=\"reqadmin\">Requires Admin</em> " - end - elseif item.type == "domain" then - if item.tags.domain == "server" then - return "<strong class=\"server\">[Server]</strong>" - elseif item.tags.domain == "client" then - return "<strong class=\"client\">[Client]</strong>" - elseif item.tags.domain == "shared" then - return "<strong class=\"shared\">[Shared]</strong>" + decorators["reqadmin"] = true end end - return default_handeler(item) + if item.tags.domain then + decorators.domain = item.tags.domain + end + local s = default_handler(item) + for k,v in pairs(decorators) do + s = decorate[k](v,s) + end + return s end style = "doc" readme = {"README.md"} |
