diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2012-02-12 08:26:41 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2012-02-12 08:26:41 +0400 |
commit | e39ed8bc955c112029789e93e208f813eeaa20e5 (patch) | |
tree | 5a5abd2291de77e2785c907169e9c2c843c3d062 | |
parent | a892d91f64ba8aaff46461bf8622b42c451d1239 (diff) |
Fixed inline doc parser
-rw-r--r-- | inline.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -185,10 +185,11 @@ function dok.refresh() local html = dok.dok2html(content) local funcs = dok.html2funcs(html, package) local pkg = _G[package] - if type(pkg) ~= 'table' then -- unsafe import, use protected import + if type(pkg) ~= 'table' and _G._torchimport then + -- unsafe import, use protected import pkg = _G._torchimport[package] end - if pkg then + if pkg and type(pkg) == 'table' then -- level 0: the package itself dok.inline[pkg] = dok.inline[pkg] or funcs['dok'] or funcs['reference.dok'] or funcs['overview.dok'] -- next levels |