From a0d81380ef1dda7368309b9070d627cab8082b57 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 10 May 2025 16:55:23 +0200 Subject: rename and extend list ElementTypeIsBracketing -> ElementTypeIsEnclosure --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '_extensions') diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua index ca2aea8..1be6926 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -66,10 +66,12 @@ local Enclosure = { BRACED = "3", } --- element types that represents bracket enclosure in Markdown -local ElementTypeIsBracketing = { +-- element types representing content enclosure in Markdown +local ElementTypeIsEnclosure = { + Emph = true, Image = true, Link = true, + Strong = true, } -- TODO: cover non-ASCII Unicode characters @@ -235,9 +237,9 @@ local function Statements (block) -- non-string element if el.t ~= 'Str' then - -- specific elements represent bracketing + -- specific elements represent content enclosure if enclosure == Enclosure.NONE then - if ElementTypeIsBracketing[el.t] then + if ElementTypeIsEnclosure[el.t] then enclosure = Enclosure.BRACKETED_DONE end -- cgit v1.2.3