Windows line endings led to wrong section names in Markdown documents
Steve Donovan
7 years ago
89 | 89 |
end
|
90 | 90 |
local title = line:match (title_pat)
|
91 | 91 |
if title then
|
|
92 |
--- Windows line endings are the cockroaches of text
|
|
93 |
title = title:gsub('\r$','')
|
92 | 94 |
-- Markdown allows trailing '#'...
|
93 | 95 |
title = title:gsub('%s*#+$','')
|
94 | 96 |
sections[L] = F:add_document_section(lstrip(title))
|