This commit is contained in:
Karl Seguin
2025-07-22 07:57:17 +08:00
parent 0b793d82fe
commit f0d6d9d177

View File

@@ -95,8 +95,8 @@ pub const URL = struct {
} }
// schema only is valid! // schema only is valid!
break :blk std.Uri{ break :blk std.Uri{
.scheme = raw.?[0..raw.?.len - 3], .scheme = raw.?[0 .. raw.?.len - 3],
.host = .{.percent_encoded = ""}, .host = .{ .percent_encoded = "" },
}; };
}; };
@@ -571,10 +571,10 @@ test "Browser.URL" {
try runner.testCases(&.{ try runner.testCases(&.{
.{ "let sk = new URL('sveltekit-internal://')", null }, .{ "let sk = new URL('sveltekit-internal://')", null },
.{ "sk.protocol", "sveltekit-internal:"}, .{ "sk.protocol", "sveltekit-internal:" },
.{ "sk.host", ""}, .{ "sk.host", "" },
.{ "sk.hostname", ""}, .{ "sk.hostname", "" },
.{ "sk.href", "sveltekit-internal://"} .{ "sk.href", "sveltekit-internal://" },
}, .{}); }, .{});
} }