authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-03 20:51:57 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-03 20:51:57 -08:00
logf183818589f0ee910ba024c2086aec9cad3366d8
treea1aadd1dbb5552ae12143b685240cde4f39f8227
parentd4423c228d4eb0a749fec2db387df8b5bf522d3e

fix endsInANumber and parseIPv4Number doc comment


1 files changed, 2 insertions(+), 2 deletions(-)

url.zig+2-2
...@@ -1257,7 +1257,7 @@ fn domainToAscii(allocator: std.mem.Allocator, domain: []const u8, beStrict: boo...@@ -1257,7 +1257,7 @@ fn domainToAscii(allocator: std.mem.Allocator, domain: []const u8, beStrict: boo
1257 return result;1257 return result;
1258}1258}
12591259
1260// https://url.spec.whatwg.org/#ends-in-a-number-checker1260/// https://url.spec.whatwg.org/#ends-in-a-number-checker
1261fn endsInANumber(input: []const u8) bool {1261fn endsInANumber(input: []const u8) bool {
1262 // 1. Let parts be the result of strictly splitting input on U+002E (.).1262 // 1. Let parts be the result of strictly splitting input on U+002E (.).
1263 // 2. If the last item in parts is the empty string, then:1263 // 2. If the last item in parts is the empty string, then:
...@@ -1337,7 +1337,7 @@ fn parseIPv4(input: []const u8) !u32 {...@@ -1337,7 +1337,7 @@ fn parseIPv4(input: []const u8) !u32 {
1337 return ipv4;1337 return ipv4;
1338}1338}
13391339
1340// https://url.spec.whatwg.org/#ipv4-number-parser1340/// https://url.spec.whatwg.org/#ipv4-number-parser
1341fn parseIPv4Number(input_: []const u8, T: type) !T {1341fn parseIPv4Number(input_: []const u8, T: type) !T {
1342 var input = input_;1342 var input = input_;
1343 // 1. If input is the empty string, then return failure.1343 // 1. If input is the empty string, then return failure.