aboutsummaryrefslogtreecommitdiff
path: root/_extensions
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-09 10:00:45 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-09 10:00:45 +0200
commitc2f587ec3b5d9bed3b927d295030ba26a3bb3f49 (patch)
tree5d81348524e840bded1505408e29c1adecc61f3e /_extensions
parent4b4e2d1f70e1bcfa15b925fe799c8158ac0373dd (diff)
rename variable _prefix -> curie_prefix
Diffstat (limited to '_extensions')
-rw-r--r--_extensions/ruc-play/semantic-markdown/semantic-markdown.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
index 8d16d9c..c3043de 100644
--- a/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
+++ b/_extensions/ruc-play/semantic-markdown/semantic-markdown.lua
@@ -59,16 +59,18 @@ os.setlocale 'C'
-- TODO: cover non-ASCII Unicode characters
-- @see <https://www.lua.org/manual/5.4/manual.html#6.5>
---- Curie_long - CURIE with prefix and reference as set of chars
+--- curie_prefix - CURIE prefix component as set of chars
--- @see <https://www.w3.org/TR/2010/NOTE-curie-20101216/>
local _name_start_char = "A-Z_a-z"
local _name_char = _name_start_char.."-0-9"
local _ref = "[".._name_start_char.."][".._name_char.."]*"
-local _prefix = "[".._name_start_char.."_-][".._name_char.."]*"
-local curie_long = _prefix..":".._ref
+local curie_prefix = "[".._name_start_char.."_-][".._name_char.."]*"
+
+--- curie_long - CURIE with prefix and reference as set of chars
+local curie_long = curie_prefix..":".._ref
--- curie_no_ref - CURIE with only prefix as set of chars
-local curie_no_ref = _prefix..":"
+local curie_no_ref = curie_prefix..":"
--- curie_local - CURIE with only name as set of chars
local curie_local = ":".._ref
@@ -79,7 +81,7 @@ local curie_default = ":"
-- TODO: curie_re - CURIE as `LPeg.re` regex object
-- TODO: test and replace above curie* patterns
-- @see <https://pandoc.org/lua-filters.html#global-variables>
---local curie_re = re.compile("(".._prefix..")?:(".._ref..")?")
+--local curie_re = re.compile("("..curie_prefix..")?:(".._ref..")?")
-- FIXME: define RDF context same as RDFa
-- TODO: maybe support overriding context with a JSON-LD URI