diff options
author | Ronan Collobert <ronan@collobert.com> | 2014-03-20 14:43:57 +0400 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2014-03-20 14:43:57 +0400 |
commit | aaab223118159ee3d58f4754bb41c39c838d8ddd (patch) | |
tree | 7b97bae3f8cb2b7c0c1f97e4f8809829795ce80f | |
parent | 693633f5a84fe74bd104f3678b838db38a6a3558 (diff) |
fix verbatim output (missing linebreak)
-rw-r--r-- | ascii.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -401,8 +401,11 @@ local function preprocess(txt, style) end local function showindent(out, text, indent) - for line in text:gmatch('[^\n]+') do + for line, brk in text:gmatch('([^\n]+)([\n]*)') do table.insert(out, string.rep(' ', indent) .. line) + for i=1,#brk-1 do + table.insert(out, '') + end end end |