Commit e91b6bd
committed
docs(sidebar): Support path-aware active detection for sub-project links
why: Links with pathnames (e.g. /pytest-plugin/) never matched because
the script only checked hostname. Sub-project links on the same domain
need path prefix matching to highlight correctly.
what:
- Parse each link as a URL and check for a pathname
- Links with a path: match origin + path prefix
- Links without a path: match hostname only (unchanged behavior)1 parent 5a4f8c7 commit e91b6bd
1 file changed
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
0 commit comments