about summary refs log tree commit diff stats
path: root/log_browser.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-18 01:56:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-18 01:56:42 -0700
commitf6596832fd50b3c640b5ed0707ddd0fda845d75e (patch)
tree94a7da182fb6391f98196ba55eb4264593e57801 /log_browser.lua
parentcb261f56b2e6cad297921a4d4457c0fbf2d78103 (diff)
parentcf227f9031a6b8a9186b534bc51425655a7e0970 (diff)
downloadtext.love-f6596832fd50b3c640b5ed0707ddd0fda845d75e.tar.gz
Merge lines.love
Diffstat (limited to 'log_browser.lua')
-rw-r--r--log_browser.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/log_browser.lua b/log_browser.lua
index f65117f..91f02eb 100644
--- a/log_browser.lua
+++ b/log_browser.lua
@@ -27,7 +27,14 @@ log_browser = {}
 function log_browser.parse(State)
   for _,line in ipairs(State.lines) do
     if line.data ~= '' then
-      line.filename, line.line_number, line.data = line.data:match('%[string "([^:]*)"%]:([^:]*):%s*(.*)')
+      local rest
+      line.filename, line.line_number, rest = line.data:match('%[string "([^:]*)"%]:([^:]*):%s*(.*)')
+      if line.filename == nil then
+        line.filename, line.line_number, rest = line.data:match('([^:]*):([^:]*):%s*(.*)')
+      end
+      if rest then
+        line.data = rest
+      end
       line.filename = guess_source(line.filename)
       line.line_number = tonumber(line.line_number)
       if line.data:sub(1,1) == '{' then