about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-17 22:56:11 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-17 22:56:11 -0700
commit620176263a2a2a6f2dac2940a50392e7c8bc71d1 (patch)
tree9c9b382b3a3bdd895aae6ed4c3bf665853d7d179
parent72791d9c35be82043a2f272a8cdeb11bd676a313 (diff)
downloadview.love-620176263a2a2a6f2dac2940a50392e7c8bc71d1.tar.gz
bugfix: log filenames can have 2 formats
-rw-r--r--log_browser.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/log_browser.lua b/log_browser.lua
index f65117f..5438584 100644
--- a/log_browser.lua
+++ b/log_browser.lua
@@ -27,7 +27,10 @@ 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*(.*)')
+      line.filename, line.line_number, line.data = line.data:match('([^:]*):([^:]*):%s*(.*)')
+      if line.filename == nil then
+        line.filename, line.line_number, line.data = line.data:match('%[string "([^:]*)"%]:([^:]*):%s*(.*)')
+      end
       line.filename = guess_source(line.filename)
       line.line_number = tonumber(line.line_number)
       if line.data:sub(1,1) == '{' then