aboutsummaryrefslogtreecommitdiff
path: root/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-14 19:07:00 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-14 19:12:59 +0200
commit271dafda87fc90d931794024a2d3d3a5f8b032c1 (patch)
treeb7554c56c51848b2010ca28bf4340459aadd3baf /_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
parent0494ad24b266e50eca990e3adeb15e4609f72385 (diff)
fix collect post-enclosure string as such
Diffstat (limited to '_extensions/ruc-play/semantic-markdown/semantic-markdown.lua')
-rw-r--r--_extensions/ruc-play/semantic-markdown/semantic-markdown.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
index ef55076..022e9de 100644
--- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
+++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
@@ -417,11 +417,6 @@ local function Statements (block)
local _, nextpos4 = el.text:find(curie_pattern4, pos)
local nextpos = nextpos1 or nextpos2 or nextpos3 or nextpos4
if nextpos then
- statement_count = statement_count + 1
- pos = nextpos + 1
-
- -- TODO: instead recursively call Statements() on remains of Str
- chars_enclosed = chars_enclosed..el.text:sub(pos)
-- qualify completed bracketed enclosure
elems:extend(elems_enclosed)
@@ -433,6 +428,12 @@ local function Statements (block)
end
chars_unenclosed = ""
encl = Enclosure.NONE
+
+ statement_count = statement_count + 1
+ pos = nextpos + 1
+
+ -- TODO: instead recursively call Statements() on remains of Str
+ chars_unenclosed = chars_unenclosed..el.text:sub(pos)
end
end