aboutsummaryrefslogtreecommitdiff
path: root/string2.moon
diff options
context:
space:
mode:
Diffstat (limited to 'string2.moon')
-rw-r--r--string2.moon3
1 files changed, 3 insertions, 0 deletions
diff --git a/string2.moon b/string2.moon
index e6db628..de2980d 100644
--- a/string2.moon
+++ b/string2.moon
@@ -51,6 +51,9 @@ string2 = {
lines[#lines+1] = line
return table.concat(lines, "\n")
+ indented: (indent=" ")=>
+ indent..(gsub(@, "\n", "\n"..indent))
+
as_lua: =>
escaped = gsub(@, "\\", "\\\\")
escaped = gsub(escaped, "\n", "\\n")