From e09650276a19bc3b02442fcdbfaab0c474368862 Mon Sep 17 00:00:00 2001 From: Skye M Date: Tue, 12 May 2020 01:49:51 +0100 Subject: [PATCH] Improve markdown output from finddesc.lua * It didn't add spaces after the ## or #, which made them not work as headings in some renderers, so I fixed this. * I then made it add newlines to make it look nicer without being rendered. --- finddesc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/finddesc.lua b/finddesc.lua index 513a271..d2c4df4 100644 --- a/finddesc.lua +++ b/finddesc.lua @@ -12,14 +12,14 @@ for _,file in pairs(tA) do for k,v in pairs(lines) do local name, args, desc = v:match("function%s+(.+)%s*%((.*)%)%s*%-%-%s*(.+)") if name and args and desc then - docfiles[file][#docfiles[file]+1] = string.format("##%s(%s)\n%s",name,args,desc) + docfiles[file][#docfiles[file]+1] = string.format("## %s(%s)\n%s\n",name,args,desc) end end end for k,v in pairs(docfiles) do if #v > 0 then - print("#"..k) + print("\n# "..k) for l,m in pairs(v) do print(m) end