Codebase list lua-ldoc / f3e5a5a
Windows line endings led to wrong section names in Markdown documents Steve Donovan 7 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8989 end
9090 local title = line:match (title_pat)
9191 if title then
92 --- Windows line endings are the cockroaches of text
93 title = title:gsub('\r$','')
9294 -- Markdown allows trailing '#'...
9395 title = title:gsub('%s*#+$','')
9496 sections[L] = F:add_document_section(lstrip(title))