@@ -179,7 +179,7 @@ url_pattern_component<regex_provider>::compile(
179
179
}
180
180
181
181
// For each part of part list:
182
- // - If part’ s type is "regexp", then set has regexp groups to true.
182
+ // - If part' s type is "regexp", then set has regexp groups to true.
183
183
const auto has_regexp = [](const auto & part) { return part.is_regexp (); };
184
184
const bool has_regexp_groups = std::ranges::any_of (*part_list, has_regexp);
185
185
@@ -326,32 +326,32 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
326
326
return std::nullopt;
327
327
}
328
328
329
- // Set protocol to url’ s scheme.
329
+ // Set protocol to url' s scheme.
330
330
// IMPORTANT: Not documented on the URLPattern spec, but protocol suffix ':'
331
331
// is removed. Similar work was done on workerd:
332
332
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2038
333
333
protocol = url->get_protocol ().substr (0 , url->get_protocol ().size () - 1 );
334
- // Set username to url’ s username.
334
+ // Set username to url' s username.
335
335
username = url->get_username ();
336
- // Set password to url’ s password.
336
+ // Set password to url' s password.
337
337
password = url->get_password ();
338
- // Set hostname to url’ s host, serialized, or the empty string if the value
338
+ // Set hostname to url' s host, serialized, or the empty string if the value
339
339
// is null.
340
340
hostname = url->get_hostname ();
341
- // Set port to url’ s port, serialized, or the empty string if the value is
341
+ // Set port to url' s port, serialized, or the empty string if the value is
342
342
// null.
343
343
port = url->get_port ();
344
344
// Set pathname to the result of URL path serializing url.
345
345
pathname = url->get_pathname ();
346
- // Set search to url’ s query or the empty string if the value is null.
346
+ // Set search to url' s query or the empty string if the value is null.
347
347
// IMPORTANT: Not documented on the URLPattern spec, but search prefix '?'
348
348
// is removed. Similar work was done on workerd:
349
349
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2232
350
350
if (url->has_search ()) {
351
351
auto view = url->get_search ();
352
352
search = view.starts_with (" ?" ) ? url->get_search ().substr (1 ) : view;
353
353
}
354
- // Set hash to url’ s fragment or the empty string if the value is null.
354
+ // Set hash to url' s fragment or the empty string if the value is null.
355
355
// IMPORTANT: Not documented on the URLPattern spec, but hash prefix '#' is
356
356
// removed. Similar work was done on workerd:
357
357
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2242
@@ -361,7 +361,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
361
361
}
362
362
}
363
363
364
- // Let protocolExecResult be RegExpBuiltinExec(urlPattern’ s protocol
364
+ // Let protocolExecResult be RegExpBuiltinExec(urlPattern' s protocol
365
365
// component's regular expression, protocol).
366
366
auto protocol_exec_result =
367
367
regex_provider::regex_search (protocol, protocol_component.regexp );
@@ -370,7 +370,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
370
370
return std::nullopt;
371
371
}
372
372
373
- // Let usernameExecResult be RegExpBuiltinExec(urlPattern’ s username
373
+ // Let usernameExecResult be RegExpBuiltinExec(urlPattern' s username
374
374
// component's regular expression, username).
375
375
auto username_exec_result =
376
376
regex_provider::regex_search (username, username_component.regexp );
@@ -379,7 +379,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
379
379
return std::nullopt;
380
380
}
381
381
382
- // Let passwordExecResult be RegExpBuiltinExec(urlPattern’ s password
382
+ // Let passwordExecResult be RegExpBuiltinExec(urlPattern' s password
383
383
// component's regular expression, password).
384
384
auto password_exec_result =
385
385
regex_provider::regex_search (password, password_component.regexp );
@@ -388,7 +388,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
388
388
return std::nullopt;
389
389
}
390
390
391
- // Let hostnameExecResult be RegExpBuiltinExec(urlPattern’ s hostname
391
+ // Let hostnameExecResult be RegExpBuiltinExec(urlPattern' s hostname
392
392
// component's regular expression, hostname).
393
393
auto hostname_exec_result =
394
394
regex_provider::regex_search (hostname, hostname_component.regexp );
@@ -397,7 +397,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
397
397
return std::nullopt;
398
398
}
399
399
400
- // Let portExecResult be RegExpBuiltinExec(urlPattern’ s port component's
400
+ // Let portExecResult be RegExpBuiltinExec(urlPattern' s port component's
401
401
// regular expression, port).
402
402
auto port_exec_result =
403
403
regex_provider::regex_search (port, port_component.regexp );
@@ -406,7 +406,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
406
406
return std::nullopt;
407
407
}
408
408
409
- // Let pathnameExecResult be RegExpBuiltinExec(urlPattern’ s pathname
409
+ // Let pathnameExecResult be RegExpBuiltinExec(urlPattern' s pathname
410
410
// component's regular expression, pathname).
411
411
auto pathname_exec_result =
412
412
regex_provider::regex_search (pathname, pathname_component.regexp );
@@ -415,7 +415,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
415
415
return std::nullopt;
416
416
}
417
417
418
- // Let searchExecResult be RegExpBuiltinExec(urlPattern’ s search component's
418
+ // Let searchExecResult be RegExpBuiltinExec(urlPattern' s search component's
419
419
// regular expression, search).
420
420
auto search_exec_result =
421
421
regex_provider::regex_search (search, search_component.regexp );
@@ -424,7 +424,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
424
424
return std::nullopt;
425
425
}
426
426
427
- // Let hashExecResult be RegExpBuiltinExec(urlPattern’ s hash component's
427
+ // Let hashExecResult be RegExpBuiltinExec(urlPattern' s hash component's
428
428
// regular expression, hash).
429
429
auto hash_exec_result =
430
430
regex_provider::regex_search (hash, hash_component.regexp );
@@ -438,42 +438,42 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
438
438
// Set result["inputs"] to inputs.
439
439
result.inputs = std::move (inputs);
440
440
// Set result["protocol"] to the result of creating a component match result
441
- // given urlPattern’ s protocol component, protocol, and protocolExecResult.
441
+ // given urlPattern' s protocol component, protocol, and protocolExecResult.
442
442
result.protocol = protocol_component.create_component_match_result (
443
443
std::move (protocol), std::move (*protocol_exec_result));
444
444
445
445
// Set result["username"] to the result of creating a component match result
446
- // given urlPattern’ s username component, username, and usernameExecResult.
446
+ // given urlPattern' s username component, username, and usernameExecResult.
447
447
result.username = username_component.create_component_match_result (
448
448
std::move (username), std::move (*username_exec_result));
449
449
450
450
// Set result["password"] to the result of creating a component match result
451
- // given urlPattern’ s password component, password, and passwordExecResult.
451
+ // given urlPattern' s password component, password, and passwordExecResult.
452
452
result.password = password_component.create_component_match_result (
453
453
std::move (password), std::move (*password_exec_result));
454
454
455
455
// Set result["hostname"] to the result of creating a component match result
456
- // given urlPattern’ s hostname component, hostname, and hostnameExecResult.
456
+ // given urlPattern' s hostname component, hostname, and hostnameExecResult.
457
457
result.hostname = hostname_component.create_component_match_result (
458
458
std::move (hostname), std::move (*hostname_exec_result));
459
459
460
460
// Set result["port"] to the result of creating a component match result given
461
- // urlPattern’ s port component, port, and portExecResult.
461
+ // urlPattern' s port component, port, and portExecResult.
462
462
result.port = port_component.create_component_match_result (
463
463
std::move (port), std::move (*port_exec_result));
464
464
465
465
// Set result["pathname"] to the result of creating a component match result
466
- // given urlPattern’ s pathname component, pathname, and pathnameExecResult.
466
+ // given urlPattern' s pathname component, pathname, and pathnameExecResult.
467
467
result.pathname = pathname_component.create_component_match_result (
468
468
std::move (pathname), std::move (*pathname_exec_result));
469
469
470
470
// Set result["search"] to the result of creating a component match result
471
- // given urlPattern’ s search component, search, and searchExecResult.
471
+ // given urlPattern' s search component, search, and searchExecResult.
472
472
result.search = search_component.create_component_match_result (
473
473
std::move (search), std::move (*search_exec_result));
474
474
475
475
// Set result["hash"] to the result of creating a component match result given
476
- // urlPattern’ s hash component, hash, and hashExecResult.
476
+ // urlPattern' s hash component, hash, and hashExecResult.
477
477
result.hash = hash_component.create_component_match_result (
478
478
std::move (hash), std::move (*hash_exec_result));
479
479
0 commit comments