aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_extensions/ruc-play/semantic-markdown/semantic-markdown.lua8
1 files 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 12fa812..54b2732 100644
--- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
+++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
@@ -127,11 +127,11 @@ local curie_default = ":"
local function Namespaces(blocks)
-- paragraph with only a braced prefix-only CURIE, colon and one word
- local pattern = "^{"..curie_prefix.."}:$"
+ local curie_pattern = "^{"..curie_prefix.."}:$"
if #blocks.content == 3
and blocks.content[1].t == "Str"
and blocks.content[2].t == "Space"
- and blocks.content[1].text:match(pattern)
+ and blocks.content[1].text:match(curie_pattern)
then
-- default namespace, misparsed as a citation
@@ -146,12 +146,12 @@ local function Namespaces(blocks)
end
-- namespace
- local pattern = "^https?:"
+ local proto_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(pattern)
+ and blocks.content[3].text:match(proto_pattern)
then
-- FIXME: add CURIE and URI to metadata
return {}