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