From 46faf3c0e4ce9eaa5e163fe40f2b501f531144a1 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 9 May 2025 10:07:50 +0200 Subject: fix match URI --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua index d0f68ab..6e21889 100644 --- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua +++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua @@ -131,11 +131,12 @@ local function Namespaces(blocks) end -- namespace + local pattern = "^https?:" if blocks.content[3].t == "Str" -- TODO: maybe check case-insensitively -- TODO: relax to match URI syntax without hardcoded protocols - and blocks.content[3].text:match "^https?:" + and blocks.content[3].text:match(pattern) then -- FIXME: add CURIE and URI to metadata return {} -- cgit v1.2.3