Skip to content

Commit 16c66a0

Browse files
committedJan 18, 2018
fix(iri): Allows IRNs.
1 parent 4478dc3 commit 16c66a0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

Diff for: ‎src/regexValues/iri.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { checkRegex, Rule } from 'rulr';
22
import { createTypeWarning } from '../warnings/TypeWarning';
33

4-
const regex = /^\w+:\/\//i;
4+
const regex = /^\w+:/i;
55
const warningConstructor = createTypeWarning('Internationalized Resource Identifier (IRI)');
66

77
export default checkRegex(regex, warningConstructor) as Rule;

Diff for: ‎src/tests/regexValues/iri.ts

+4
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ export default (test: Test) => {
2828
// Tests from the conformance suite.
2929
itsInvalid('ab=c://should.fail.com', 'not an IRI', test);
3030
itsInvalid('not.a.valid.iri.com/verb', 'not an IRI', test);
31+
32+
// LL-472
33+
itsValid('urn:071b8229-c909-5d6f-b250-8cbb6f36fda7:Test:Test_0', test);
34+
itsValid('urn:uuid:a4942cbb-aabf-526f-8f69-379f265416b5', test);
3135
};

0 commit comments

Comments
 (0)
Please sign in to comment.