aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu_compiler.lua')
-rw-r--r--nomsu_compiler.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua
index 2b68bd9..b51605b 100644
--- a/nomsu_compiler.lua
+++ b/nomsu_compiler.lua
@@ -1001,9 +1001,13 @@ do
break
end
if tree.type == "Text" then
- if (function()
+ local check_for_nl
+ check_for_nl = function(tree)
local found_nl = false
for i, b in ipairs(tree) do
+ if type(b) ~= 'string' and b.type == "Text" and check_for_nl(b) then
+ return true
+ end
if i == 1 and type(b) == 'string' then
b = b:match('^[\n]*(.*)')
end
@@ -1012,7 +1016,8 @@ do
return true
end
end
- end)() then
+ end
+ if check_for_nl(tree) then
break
end
end