Browse Source

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.
pull/2/head
Skye M 4 years ago
parent
commit
e09650276a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      finddesc.lua

+ 2
- 2
finddesc.lua View File

@@ -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


Loading…
Cancel
Save