Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sundown-ffi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2014-03-20 14:43:57 +0400
committerRonan Collobert <ronan@collobert.com>2014-03-20 14:43:57 +0400
commitaaab223118159ee3d58f4754bb41c39c838d8ddd (patch)
tree7b97bae3f8cb2b7c0c1f97e4f8809829795ce80f
parent693633f5a84fe74bd104f3678b838db38a6a3558 (diff)
fix verbatim output (missing linebreak)
-rw-r--r--ascii.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/ascii.lua b/ascii.lua
index de72f41..e033afe 100644
--- a/ascii.lua
+++ b/ascii.lua
@@ -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