From 1046e096eddad0455e4de8830dec51665f63593d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Tue, 18 May 2021 20:56:47 +0200 Subject: [PATCH] Fix missing filename case --- luamml-tex.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luamml-tex.lua b/luamml-tex.lua index 6f08ec5..24b0072 100644 --- a/luamml-tex.lua +++ b/luamml-tex.lua @@ -46,10 +46,10 @@ local call_cmd = token.command_id'call' local function save_result(xml, display) mlist_result, mlist_display = xml, display - if filename_token.command ~= undefined_cmd then - assert(filename_token.command == call_cmd) - token.put_next(filename_token) - assert(io.open(token.scan_string(), 'w')) + token.put_next(filename_token) + local filename = token.scan_argument() + if filename ~= '' then + assert(io.open(filename, 'w')) :write(write_xml(make_root({[0] = 'mrow', xml}, display and 0 or 2)) .. '\n') :close() end