Skip to content

Commit edde0ca

Browse files
committed
allow urn identifiers
1 parent 03b9026 commit edde0ca

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

elot-defs.org

+2
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ annotations in a future improved version, from sub-items.
417417
;; single URI in parentheses
418418
((string-match (format "(<?\\(%s\\)>?)" full-uri-regex) str)
419419
(format "<%s>" (match-string 1 str)))
420+
;; URN identifier: return as-is if the string is a URN, e.g. <urn:isbn:0943396611>
421+
((string-match "^<urn:[^>]+>$" str) str)
420422
;; two CURIEs in parentheses (ontology and ontology version)
421423
((string-match (format "(\\(%s\\) \\(%s\\))" curie-regex curie-regex) str)
422424
(format "%s %s" (match-string 1 str) (match-string 2 str)))

elot-package/elot.el

+2
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ or a full-form URI in angle brackets)."
369369
;; single URI in parentheses
370370
((string-match (format "(<?\\(%s\\)>?)" full-uri-regex) str)
371371
(format "<%s>" (match-string 1 str)))
372+
;; URN identifier: return as-is if the string is a URN, e.g. <urn:isbn:0943396611>
373+
((string-match "^<urn:[^>]+>$" str) str)
372374
;; two CURIEs in parentheses (ontology and ontology version)
373375
((string-match (format "(\\(%s\\) \\(%s\\))" curie-regex curie-regex) str)
374376
(format "%s %s" (match-string 1 str) (match-string 2 str)))

0 commit comments

Comments
 (0)