Commit ed84090
committed
fix: fall back to strict regex when path contains {#...} or literal #
_split_query_tail enabled lenient matching for page{#section}{?q},
but lenient matching's partition('#') stripped the fragment before
the path regex (which expects #section) could see it, causing
fullmatch to always fail.
Extended the path-portion fallback check to also bail on {#...}
expressions and literal # characters, mirroring the existing ? check.
Such templates are semantically unusual (query-after-fragment is not
valid URI structure) but now round-trip correctly via strict regex.1 parent 7c34c12 commit ed84090
File tree
2 files changed
+10
-5
lines changed2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
583 | | - | |
584 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
585 | 586 | | |
586 | 587 | | |
587 | | - | |
| 588 | + | |
588 | 589 | | |
589 | | - | |
| 590 | + | |
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
455 | 459 | | |
456 | 460 | | |
457 | 461 | | |
| |||
0 commit comments