aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-06-22 14:58:15 +0200
committerJonas Smedegaard <dr@jones.dk>2025-06-22 14:58:15 +0200
commit1cac8738a4845dc96583e854c7784515b9eae336 (patch)
tree2bbcb90a73f849510d00229f77fd98171d74b04e
parent55663bb20cdcc1fcd640f5cadf820a9b721e322b (diff)
fix include brace-end in disclosed stray braced-only enclosure
-rw-r--r--sem-md/sem-md.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/sem-md/sem-md.lua b/sem-md/sem-md.lua
index b214c43..9601fbd 100644
--- a/sem-md/sem-md.lua
+++ b/sem-md/sem-md.lua
@@ -613,7 +613,7 @@ local function Statements (block)
local nextpos = nextpos1 or nextpos2 or nextpos3 or nextpos4 or nextpos5
if nextpos then
iffy.elementize_chars_enclosed()
- local str_inside = str:sub(pos, nextpos)
+ local str_inside = str:sub(pos, nextpos - 1)
pos = nextpos + 1
local str_remains = str:sub(pos)
@@ -636,7 +636,7 @@ local function Statements (block)
-- stray braced-only enclosure
else
- iffy.append_chars_unenclosed(str_inside)
+ iffy.append_chars_unenclosed(str_inside .. "}")
iffy.disqualify()
encl = Enclosure.NONE
end