aboutsummaryrefslogtreecommitdiff
path: root/modules/lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-05-15 18:00:51 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-05-15 18:00:51 -0400
commit70c7197c4300565cb9fd8326ed4cc5ed6d8b7e82 (patch)
tree2de451148bd18e7fc32d0e4906c68e1736b640c1 /modules/lua
parent630ba1e515d224b6bbc1537169658e3cb7543d80 (diff)
downloadtextadept-70c7197c4300565cb9fd8326ed4cc5ed6d8b7e82.tar.gz
textadept-70c7197c4300565cb9fd8326ed4cc5ed6d8b7e82.zip
Fix absolute field tags; modules/lua/adeptsensedoc.lua
An absolute field like '_G.events.FILE_OPENED' used to be tagged as belonging to the 'io' module, but it is tagged properly now.
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/adeptsensedoc.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/lua/adeptsensedoc.lua b/modules/lua/adeptsensedoc.lua
index f0bf42f3..d1a436b8 100644
--- a/modules/lua/adeptsensedoc.lua
+++ b/modules/lua/adeptsensedoc.lua
@@ -246,11 +246,15 @@ function M.start(doc)
end
-- Tag the fields.
for _, f in ipairs(m.fields or {}) do
+ local field = m.fields[f]
+ local module = module -- define locally so any modification stays local
+ if f:find('^_G%.') then module, f = f:match('^_G%.(.-)%.?([^%.]+)$') end
+ if not module then print(field.name) end
local ext_fields = module == '_G' and '' or 'class:'..module
write_tag(ctags, f, 'F', ext_fields)
write_apidoc(apidoc, {name = f}, {
name = module..'.'..f,
- description = m.fields[f],
+ description = field,
class = 'field'
})
end