From 830ef73539e865b2d979e70b2d9115a4d1a07104 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 10 May 2025 14:24:13 +0200 Subject: match IRI scheme case-insensitively; drop comment about case-sensitivity for matching keyword @default --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua index ef02b83..212809e 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -139,7 +139,6 @@ local function Namespaces(blocks) if el.t == "Cite" and #el.content == 1 - -- TODO: maybe check case-insensitively and el.content[1].text == "@default" then -- FIXME: add CURIE to metadata @@ -147,11 +146,9 @@ local function Namespaces(blocks) end -- namespace - local proto_pattern = "^https?:" + -- TODO: relax to match URI syntax without hardcoded protocols + local proto_pattern = "^[Hh][Tt][Tt][Pp][Ss]?:" if el.t == "Str" - - -- TODO: maybe check case-insensitively - -- TODO: relax to match URI syntax without hardcoded protocols and el.text:match(proto_pattern) then -- FIXME: add CURIE and URI to metadata -- cgit v1.2.3