From c2f587ec3b5d9bed3b927d295030ba26a3bb3f49 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 9 May 2025 10:00:45 +0200 Subject: rename variable _prefix -> curie_prefix --- _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '_extensions') 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 ---- Curie_long - CURIE with prefix and reference as set of chars +--- curie_prefix - CURIE prefix component as set of chars --- @see 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 ---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 -- cgit v1.2.3