@@ -520,7 +520,7 @@ result<std::optional<url_pattern_result>> url_pattern::exec(
520520}
521521
522522result<bool > url_pattern::test (const url_pattern_input& input,
523- std::string_view* base_url = nullptr ) {
523+ std::string_view* base_url = nullptr ) {
524524 // TODO: Optimization opportunity. Rather than returning `url_pattern_result`
525525 // Implement a fast path just like `can_parse()` in ada_url.
526526 // Let result be the result of match given this's associated URL pattern,
@@ -681,48 +681,48 @@ result<std::optional<url_pattern_result>> url_pattern::match(
681681 }
682682 }
683683
684- auto regex_flags = std::regex_constants::match_continuous ;
684+ auto regex_flags = std::regex_constants::match_any ;
685685
686686 // Let protocolExecResult be RegExpBuiltinExec(urlPattern’s protocol
687687 // component's regular expression, protocol).
688688 std::smatch protocol_exec_result_value;
689689 auto protocol_exec_result =
690690 std::regex_search (protocol, protocol_exec_result_value,
691- protocol_component.regexp , regex_flags);
691+ protocol_component.regexp , regex_flags);
692692
693693 // Let usernameExecResult be RegExpBuiltinExec(urlPattern’s username
694694 // component's regular expression, username).
695695 std::smatch username_exec_result_value;
696696 auto username_exec_result =
697697 std::regex_search (username, username_exec_result_value,
698- username_component.regexp , regex_flags);
698+ username_component.regexp , regex_flags);
699699
700700 // Let passwordExecResult be RegExpBuiltinExec(urlPattern’s password
701701 // component's regular expression, password).
702702 std::smatch password_exec_result_value;
703703 auto password_exec_result =
704704 std::regex_search (password, password_exec_result_value,
705- password_component.regexp , regex_flags);
705+ password_component.regexp , regex_flags);
706706
707707 // Let hostnameExecResult be RegExpBuiltinExec(urlPattern’s hostname
708708 // component's regular expression, hostname).
709709 std::smatch hostname_exec_result_value;
710710 auto hostname_exec_result =
711711 std::regex_search (hostname, hostname_exec_result_value,
712- hostname_component.regexp , regex_flags);
712+ hostname_component.regexp , regex_flags);
713713
714714 // Let portExecResult be RegExpBuiltinExec(urlPattern’s port component's
715715 // regular expression, port).
716716 std::smatch port_exec_result_value;
717717 auto port_exec_result = std::regex_search (port, port_exec_result_value,
718- port_component.regexp , regex_flags);
718+ port_component.regexp , regex_flags);
719719
720720 // Let pathnameExecResult be RegExpBuiltinExec(urlPattern’s pathname
721721 // component's regular expression, pathname).
722722 std::smatch pathname_exec_result_value;
723723 auto pathname_exec_result =
724724 std::regex_search (pathname, pathname_exec_result_value,
725- pathname_component.regexp , regex_flags);
725+ pathname_component.regexp , regex_flags);
726726
727727 // Let searchExecResult be RegExpBuiltinExec(urlPattern’s search component's
728728 // regular expression, search).
@@ -734,7 +734,7 @@ result<std::optional<url_pattern_result>> url_pattern::match(
734734 // regular expression, hash).
735735 std::smatch hash_exec_result_value;
736736 auto hash_exec_result = std::regex_search (hash, hash_exec_result_value,
737- hash_component.regexp , regex_flags);
737+ hash_component.regexp , regex_flags);
738738
739739 // If protocolExecResult, usernameExecResult, passwordExecResult,
740740 // hostnameExecResult, portExecResult, pathnameExecResult, searchExecResult,
0 commit comments