| author | Marc Aubry | 2012-06-29 10:23:46 (EDT) |
|---|---|---|
| committer | sbernard | 2012-06-29 12:24:51 (EDT) |
| commit | b38ab076828af361fdcfa48d0e364ecb23c48afa (patch) (side-by-side diff) | |
| tree | c72ab99c7217813d6da96fcf4727e767277b7570 | |
| parent | b52b978b840a8a197575cb8737b994dd35d5d981 (diff) | |
| download | org.eclipse.koneki.ldt-b38ab076828af361fdcfa48d0e364ecb23c48afa.zip org.eclipse.koneki.ldt-b38ab076828af361fdcfa48d0e364ecb23c48afa.tar.gz org.eclipse.koneki.ldt-b38ab076828af361fdcfa48d0e364ecb23c48afa.tar.bz2 | |
Fix Bug 383657 - [luadocumentor] lnline link
| -rw-r--r-- | libraries/doctemplates/template/utils.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libraries/doctemplates/template/utils.lua b/libraries/doctemplates/template/utils.lua index 5bf2d4c..bff6db3 100644 --- a/libraries/doctemplates/template/utils.lua +++ b/libraries/doctemplates/template/utils.lua @@ -66,6 +66,7 @@ end M.linktypes = { internaltyperef = function(o) return string.format('##(%s)', o.typename) end, externaltyperef = function(o) return string.format('%s.html##(%s)', o.modulename, o.typename) end, + file = function(o) return string.format('%s.html', o.name) end, index = function() return 'index.html' end, recordtypedef = function(o) local anchor = M.anchor(o) @@ -324,6 +325,18 @@ local extern = function (type) end --- +-- Build an API external reference from a string like: `mod.ule` +local file = function (type) + for modulename in type:gmatch('([%a%.%d_]+)') do + local file = apimodel._file() + file.name = modulename + return file + end + return nil +end + + +--- -- Provide API Model element from a string -- @usage local externaltyperef = getelement("somemodule#somefield") function M.getelement( str ) @@ -333,7 +346,8 @@ function M.getelement( str ) globals, field, extern, - internal + internal, + file } -- Loop over extractors. -- First valid result is used |

