From d73cbf0aa5c9081d965e06822f4958aa5c1871e6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 20 Jun 2018 15:22:03 -0700 Subject: Cleanups. --- error_handling.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'error_handling.lua') diff --git a/error_handling.lua b/error_handling.lua index 3ead904..5e7d715 100644 --- a/error_handling.lua +++ b/error_handling.lua @@ -160,7 +160,7 @@ print_error = function(error_message, stack_offset) end end end - if file and calling_fn.short_src:match("%.moon$") and type(MOON_SOURCE_MAP[file]) == 'table' then + if file and (calling_fn.short_src:match("%.moon$") or file:match("^#![^\n]*moon\n")) and type(MOON_SOURCE_MAP[file]) == 'table' then local char = MOON_SOURCE_MAP[file][calling_fn.currentline] line_num = 1 for _ in file:sub(1, char):gmatch("\n") do -- cgit v1.2.3