diff options
author | 2013-05-15 18:00:51 -0400 | |
---|---|---|
committer | 2013-05-15 18:00:51 -0400 | |
commit | 70c7197c4300565cb9fd8326ed4cc5ed6d8b7e82 (patch) | |
tree | 2de451148bd18e7fc32d0e4906c68e1736b640c1 | |
parent | 630ba1e515d224b6bbc1537169658e3cb7543d80 (diff) | |
download | textadept-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.
-rw-r--r-- | modules/lua/adeptsensedoc.lua | 6 |
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 |