scansion.console: Support for indentation in lines() helper

Wed, 12 Sep 2018 10:57:23 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 12 Sep 2018 10:57:23 +0100
changeset 145
df4faaa2d36f
parent 144
f7e8b865873f
child 146
885fa9f5929d

scansion.console: Support for indentation in lines() helper

scansion/console.lua file | annotate | diff | comparison | revisions
--- a/scansion/console.lua	Wed Sep 12 10:56:51 2018 +0100
+++ b/scansion/console.lua	Wed Sep 12 10:57:23 2018 +0100
@@ -1,7 +1,7 @@
 local pretty = require "scansion.pretty".new({});
 
-local function lines(l)
-	return table.concat(l, "\n");
+local function lines(l, indent)
+	return table.concat(l, "\n"..string.rep(" ", indent or 0));
 end
 
 local handlers = {

mercurial