From 79a3ee1cf0a83dbb5280b8db6844e52e1a810361 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 26 Mar 2025 20:27:12 +0100 Subject: replace flag variable has_hints with counter statement_count --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua index 06b3c7f..e89916a 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -154,8 +154,8 @@ function Statements (blocks) -- usable as flags, since it is always preceded by a marker local pos_bracketed, pos_braced - -- maintain states across inlines - local has_hints + -- amount of detected statements in this block + local statement_count = 0 local new_inlines = {} @@ -195,14 +195,14 @@ function Statements (blocks) _, pos_brace_end = string.find(el.text, "^"..curie_long.."}", pos_braced) if pos_brace_end then - has_hints = true + statement_count = statement_count + 1 -- TODO: call same function with remains of Str end end ::continue:: end -- FIXME --- if has_hints then +-- if statement_count then -- return pandoc.Inlines {new_inlines} -- end end -- cgit v1.2.3