File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ namespace ada {
3030 if (trimmed.empty ()) { port = std::nullopt ; return true ; }
3131 // Input should not start with control characters.
3232 if (ada::unicode::is_c0_control_or_space (trimmed.front ())) { return false ; }
33- // Input should start with ascii digit character .
34- if (! checkers::is_digit ( input.front ()) ) { return false ; }
33+ // Input should contain at least one ascii digit.
34+ if (input.find_first_of ( " 0123456789 " ) == std::string_view::npos ) { return false ; }
3535
3636 // Revert changes if parse_port fails.
3737 std::optional<uint16_t > previous_port = port;
Original file line number Diff line number Diff line change 3737 "port" : " "
3838 }
3939 },
40+ {
41+ "comment" : " Leading u0009 on special scheme" ,
42+ "href" : " https://yagiz.co:443" ,
43+ "new_value" : " \u0009 8080" ,
44+ "expected" : {
45+ "port" : " 8080"
46+ }
47+ },
48+ {
49+ "comment" : " Leading u0009 on non-special scheme" ,
50+ "href" : " wpt++://yagiz.co:443" ,
51+ "new_value" : " \u0009 8080" ,
52+ "expected" : {
53+ "port" : " 8080"
54+ }
55+ },
4056 {
4157 "comment" : " Trailing control characters" ,
4258 "href" : " https://yagiz.co:443" ,
You can’t perform that action at this time.
0 commit comments