diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-03-26 07:53:03 +0100 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-03-26 07:53:03 +0100 |
| commit | 94a7fd070556d8a740f3e82a47c672c7128a6e18 (patch) | |
| tree | c6a2a6fac0933c89a3615a72cde435e0518a8aec /_extensions | |
| parent | 532001296ea13e4919e5776b85aa5b764498a6e1 (diff) | |
iterate blocks (not inlines) to keep enclosure state across inlines
Diffstat (limited to '_extensions')
| -rw-r--r-- | _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 6 |
1 files 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 <https://pandoc.org/lua-filters.html#type-inline> -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 <https://www.w3.org/TR/turtle/#sec-parsing> 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) |
