aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-09 10:07:50 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-09 10:07:50 +0200
commit46faf3c0e4ce9eaa5e163fe40f2b501f531144a1 (patch)
treeb50479a4f98f72e0a5dae2ea46a17565c0ff75a4
parente3f971b79e02ca948c306af2da160a39072426b0 (diff)
fix match URI
-rw-r--r--_extensions/ruc-play/semantic-markdown/semantic-markdown.lua3
1 files changed, 2 insertions, 1 deletions
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 {}