Skip to content

Commit bb3e27e

Browse files
committed
Additional fixes in light of discussion
Still need to wait for test roll before we're completely ready
1 parent 2e81853 commit bb3e27e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,11 @@ function validateLabel(label, {
9999
}
100100

101101
// "4. If not CheckHyphens, the label must not begin with “xn--”."
102-
// Disabled while we figure out https://github.com/whatwg/url/issues/803.
103-
// if (!checkHyphens) {
104-
// if (label.startsWith("xn--")) {
105-
// return false;
106-
// }
107-
// }
102+
if (!checkHyphens) {
103+
if (label.startsWith("xn--")) {
104+
return false;
105+
}
106+
}
108107

109108
// "5. The label must not contain a U+002E ( . ) FULL STOP."
110109
if (label.includes(".")) {

test/toascii.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ describe("ToASCII", () => {
2727
continue;
2828
}
2929

30+
if (testCase.urlStandardOnly) {
31+
// This test isn't valid for just TR46 ToASCII; it relies on behavior from the URL Standard's "domain to ASCII".
32+
continue;
33+
}
34+
3035
let description = testCase.input;
3136
if (testCase.comment) {
3237
description += ` (${testCase.comment})`;

0 commit comments

Comments
 (0)