mirror of
https://github.com/TangentFoxy/markdown.lua.git
synced 2025-07-28 01:52:17 +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("l", "inline-style", function() options.inline_style = true end)
|
||||||
op:flag("a", "append", function() options.append = true end)
|
op:flag("a", "append", function() options.append = true end)
|
||||||
op:flag("t", "test", function()
|
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)
|
local f = io.open(n)
|
||||||
if f then
|
if f then
|
||||||
f:close() dofile(n)
|
f:close()
|
||||||
|
package.loaded.markdown = markdown
|
||||||
|
dofile(n)
|
||||||
else
|
else
|
||||||
error("Cannot find markdown-tests.lua")
|
error("Cannot find markdown-tests.lua")
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user