Merge pull request #136 from hishamhm/master
Give command-line flags priority over the config file (plus minor fixes)
This commit is contained in:
commit
bbc3183e35
|
@ -33,10 +33,12 @@ build = {
|
|||
["ldoc.lexer"] = "ldoc/lexer.lua",
|
||||
["ldoc.markup"] = "ldoc/markup.lua",
|
||||
["ldoc.prettify"] = "ldoc/prettify.lua",
|
||||
["ldoc.markdown"] = "ldoc/markdown.lua",
|
||||
["ldoc.doc"] = "ldoc/doc.lua",
|
||||
["ldoc.html.ldoc_css"] = "ldoc/html/ldoc_css.lua",
|
||||
["ldoc.html.ldoc_ltp"] = "ldoc/html/ldoc_ltp.lua",
|
||||
["ldoc.html.ldoc_one_css"] = "ldoc/html/ldoc_one_css.lua",
|
||||
["ldoc.html.ldoc_pale_css"] = "ldoc/html/ldoc_pale_css.lua",
|
||||
["ldoc.builtin.globals"] = "ldoc/builtin/globals.lua",
|
||||
["ldoc.builtin.coroutine"] = "ldoc/builtin/coroutine.lua",
|
||||
["ldoc.builtin.global"] = "ldoc/builtin/global.lua",
|
||||
|
|
2
ldoc.lua
2
ldoc.lua
|
@ -135,7 +135,7 @@ local add_language_extension
|
|||
doc.ldoc = ldoc
|
||||
|
||||
local function override (field)
|
||||
if ldoc[field] ~= nil then args[field] = ldoc[field] end
|
||||
if args[field] == nil and ldoc[field] ~= nil then args[field] = ldoc[field] end
|
||||
end
|
||||
|
||||
-- aliases to existing tags can be defined. E.g. just 'p' for 'param'
|
||||
|
|
|
@ -23,7 +23,7 @@ local function resolve_inline_references (ldoc, txt, item, plain)
|
|||
local ref,err = markup.process_reference(qname)
|
||||
if not ref then
|
||||
err = err .. ' ' .. qname
|
||||
if item then item:warning(err)
|
||||
if item and item.warning then item:warning(err)
|
||||
else
|
||||
io.stderr:write('nofile error: ',err,'\n')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue