aboutsummaryrefslogtreecommitdiff
path: root/utils.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-14 19:45:36 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-14 19:45:36 -0700
commit13490a34c872f5cde6b2f094d9dda045dec066d4 (patch)
tree45891326f4067518359af245cf63a6681f50c033 /utils.lua
parented0b5a3373add330b60b1850b8212eba681b031d (diff)
Made repr fix more flexible/correct.
Diffstat (limited to 'utils.lua')
-rw-r--r--utils.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.lua b/utils.lua
index bb5005d..548ce0d 100644
--- a/utils.lua
+++ b/utils.lua
@@ -48,7 +48,7 @@ utils = {
else
for i = 0, math.huge do
local eq = ("="):rep(i)
- if not x:find("%[" .. tostring(eq) .. "%[") and not x:find("%]" .. tostring(eq) .. "%]") then
+ if not x:find("%]" .. tostring(eq) .. "%]") and not x:match(".*]" .. tostring(eq) .. "$") then
if x:sub(1, 1) == "\n" then
return "[" .. tostring(eq) .. "[\n" .. x .. "]" .. tostring(eq) .. "]"
else