From 906e9b08450dd56dc5dfc7399fe74b6f2819e7f2 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 15 May 2025 19:47:47 +0200 Subject: cover IRI (as alternative to CURIE) --- _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 c4433d1..6c3dc7e 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -498,11 +498,13 @@ local function Statements (block) local curie_pattern2 = "^"..CURIE_TYPE_PREFIX..CURIE_NO_REF.."}" local curie_pattern3 = "^"..CURIE_TYPE_PREFIX..CURIE_LOCAL.."}" local curie_pattern4 = "^"..CURIE_TYPE_PREFIX..CURIE_DEFAULT.."}" + local curie_pattern5 = "^"..CURIE_TYPE_PREFIX.."<[^<>]*>}" local _, nextpos1 = el.text:find(curie_pattern1, pos) local _, nextpos2 = el.text:find(curie_pattern2, pos) local _, nextpos3 = el.text:find(curie_pattern3, pos) local _, nextpos4 = el.text:find(curie_pattern4, pos) - local nextpos = nextpos1 or nextpos2 or nextpos3 or nextpos4 + local _, nextpos5 = el.text:find(curie_pattern5, pos) + local nextpos = nextpos1 or nextpos2 or nextpos3 or nextpos4 or nextpos5 if nextpos then if chars_enclosed:len() > 0 then elems_enclosed:insert(pandoc.Str(chars_enclosed)) @@ -565,9 +567,7 @@ local function Statements (block) if block_has_diverged then -- disqualify incomplete enclosure - if encl ~= Enclosure.NONE then - elems:extend(elems_unenclosed) - end + elems:extend(elems_unenclosed) block.content = elems return block -- cgit v1.2.3