| 317 | } |
| 318 | |
| 319 | tl::expected<std::string, errors> url_pattern_init::process_pathname( |
| 320 | std::string_view value, std::string_view protocol, process_type type) { |
| 321 | // If type is "pattern" then return pathnameValue. |
| 322 | if (type == process_type::pattern) { |
| 323 | return std::string(value); |
| 324 | } |
| 325 | |
| 326 | // If protocolValue is a special scheme or the empty string, then return the |
| 327 | // result of running canonicalize a pathname given pathnameValue. |
| 328 | if (protocol.empty() || scheme::is_special(protocol)) { |
| 329 | return url_pattern_helpers::canonicalize_pathname(value); |
| 330 | } |
| 331 | |
| 332 | // Return the result of running canonicalize an opaque pathname given |
| 333 | // pathnameValue. |
| 334 | return url_pattern_helpers::canonicalize_opaque_pathname(value); |
| 335 | } |
| 336 | |
| 337 | tl::expected<std::string, errors> url_pattern_init::process_search( |
| 338 | std::string_view value, process_type type) { |
nothing calls this directly
no test coverage detected