From 3c99418905016113beae0456ebe70a1a1c6ff667 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Thu, 28 Apr 2011 13:59:51 +0200 Subject: [PATCH] markdown does not like being passed nil ;( --- ldoc.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ldoc.lua b/ldoc.lua index 94e2ea2..db9eb25 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -543,6 +543,7 @@ if args.format ~= 'plain' then local ok,markup = pcall(require,args.format) if not ok then quit("cannot load formatter: "..args.format) end function ldoc.markup(txt) + if txt == nil then return '' end txt = markup(txt) return (txt:gsub('^%s*

(.+)

%s*$','%1')) end