From 94a7fd070556d8a740f3e82a47c672c7128a6e18 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 26 Mar 2025 07:53:03 +0100 Subject: iterate blocks (not inlines) to keep enclosure state across inlines --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua index fae8343..53f64d7 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -145,7 +145,7 @@ end --- @param inlines Markdown with semantic annotations as Inlines --- @returns Markdown stripped of semantic annotations as Inlines --- @see -function Statements (inlines) +function Statements (blocks) -- positions of enclosure markers local bracket_begin, bracket_end, brace_begin, brace_end @@ -155,7 +155,7 @@ function Statements (inlines) local new_inlines = {} - for i, el in ipairs(inlines) do + for i, el in ipairs(blocks.content) do -- only string inlines can alter state if el.t ~= 'Str' then @@ -213,7 +213,7 @@ end -- @see return { {Para = Namespaces}, - {Inlines = Statements} + {Para = Statements} -- FIXME: add custom declared namespaces in Meta -- TODO: maybe add only actively used namespaces -- (do same as for unused link definitions) -- cgit v1.2.3