allow Markdown headers in module docstring by stripping #..

This commit is contained in:
Steve Donovan 2014-06-20 15:09:38 +02:00
parent 7b496aa05b
commit a0c780f093
2 changed files with 6 additions and 1 deletions

View File

@ -189,6 +189,11 @@ function html.generate_output(ldoc, args, project)
function ldoc.is_list (t)
return type(t) == 'table' and t.append
end
function ldoc.strip_header (s)
if not s then return s end
return s:gsub('^%s*#+%s+','')
end
function ldoc.typename (tp)
if not tp or tp == '' or tp:match '^@' then return '' end

View File

@ -271,7 +271,7 @@ return [==[
# for m in mods() do
<tr>
<td class="name" $(nowrap)><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
<td class="summary">$(M(m.summary,m))</td>
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
</tr>
# end -- for modules
</table>