From 6d22818ec93c9aba6bf40f3b0ba5a5705ad1b842 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Thu, 11 Apr 2013 15:37:01 +0200 Subject: [PATCH] allow -c to be used with explicit file --- ldoc.lua | 7 +++++++ tests/styles/config/config.ld | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/styles/config/config.ld diff --git a/ldoc.lua b/ldoc.lua index 2e9be7b..ae5c8aa 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -284,6 +284,13 @@ if args.file == '.' then args.file = abspath(args.file) end else + -- user-provided config file + if args.config ~= 'config.ld' then + local err + config_dir,err = read_ldoc_config(args.config) + if err then quit("no "..quote(args.config).." found") end + end + -- with user-provided file args.file = abspath(args.file) end diff --git a/tests/styles/config/config.ld b/tests/styles/config/config.ld new file mode 100644 index 0000000..239ae21 --- /dev/null +++ b/tests/styles/config/config.ld @@ -0,0 +1,2 @@ +no_return_or_parms=true +no_summary=true