Skip to content

Commit 38c4be2

Browse files
committed
fix: replacing utf-8 non-breaking spaces
For whatever strange reasons, the regular expressions being used for CURIE validation were using UTF-8 non-breaking spaces (hex C2A0) instead of normal whitespaces. This patch fixes it. Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
1 parent e01eabe commit 38c4be2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linkml_runtime/utils/uri_validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
gen_delims = r"(?: : | / | \? | \# | \[ | \] | @ )"
4343

4444
# sub-delims = "!" / "$" / "&" / "'" / "("
45-
sub_delims = r"(?: ! | \$ | & | ' | \( | \) | \* | \+ | , | ; | = )"
45+
sub_delims = r"(?: ! | \$ | & | ' | \( | \) | \* | \+ | , | ; | = )"
4646

4747
# pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
4848
pchar = rf"(?: {unreserved} | {pct_encoded} | {sub_delims} | : | @ )"
@@ -295,7 +295,7 @@
295295
# As of now this module doesn't support NCNameChar IRI, but
296296
# relative-refs as defined in URI,
297297
# NCNameChar ::= Letter | Digit | '.' | '-' | '_'
298-
NCNameChar = rf"(?: {ALPHA} | {DIGIT} | \. | \- | _ )"
298+
NCNameChar = rf"(?: {ALPHA} | {DIGIT} | \. | \- | _ )"
299299

300300
# prefix := NCName
301301
# NCName := (Letter | '_') (NCNameChar)*

0 commit comments

Comments
 (0)