mirror of
https://github.com/TangentFoxy/markdown.lua.git
synced 2025-07-27 17:42:16 +00:00
Fix lua markdown.lua -t crashing
This commit is contained in:
@@ -1173,10 +1173,12 @@ Other options:
|
||||
op:flag("l", "inline-style", function() options.inline_style = true end)
|
||||
op:flag("a", "append", function() options.append = true end)
|
||||
op:flag("t", "test", function()
|
||||
local n = arg[0]:gsub("markdown.lua", "markdown-tests.lua")
|
||||
local n = arg[0]:gsub("markdown%.lua", "markdown-tests.lua")
|
||||
local f = io.open(n)
|
||||
if f then
|
||||
f:close() dofile(n)
|
||||
f:close()
|
||||
package.loaded.markdown = markdown
|
||||
dofile(n)
|
||||
else
|
||||
error("Cannot find markdown-tests.lua")
|
||||
end
|
||||
|
Reference in New Issue
Block a user