From 41a0d9b00906a7c123afcaa9a661ee47f8fb32d9 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 21 Dec 2013 00:41:24 -0200 Subject: [PATCH 1/3] Add entries missing in rockspec. --- ldoc-scm-2.rockspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldoc-scm-2.rockspec b/ldoc-scm-2.rockspec index 39c0635..fb86bae 100644 --- a/ldoc-scm-2.rockspec +++ b/ldoc-scm-2.rockspec @@ -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", From 9b40e03e3ae5229ebe31c51ef061932f33df9fee Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 21 Dec 2013 00:41:41 -0200 Subject: [PATCH 2/3] Command-line flags that were explicitly passed by the user should take precedence over config file defaults. --- ldoc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldoc.lua b/ldoc.lua index c92b328..6db58cc 100644 --- a/ldoc.lua +++ b/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' From 8b48e1d25675c294e450693f2b90d3a12ce098cc Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 21 Dec 2013 00:50:07 -0200 Subject: [PATCH 3/3] Don't call function when missing. Tweak needed for ldoc to build its own documentation files. --- ldoc/markup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldoc/markup.lua b/ldoc/markup.lua index ab0b5f3..5451f62 100644 --- a/ldoc/markup.lua +++ b/ldoc/markup.lua @@ -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