diff options
Diffstat (limited to '_extensions')
| -rw-r--r-- | _extensions/ruc-play/semantic-markdown/semantic-markdown.lua | 12 |
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 |
