Commit 1aaaceb
Fix scroll position test by correctly extracting hash from href
The href attributes in REX links contain the full path (e.g., "test-page-for-generic-styles#main-content")
not just the hash (e.g., "#main-content"). This was causing the selector to be constructed incorrectly
as "#test-page-for-generic-styles#main-content" which is an invalid compound ID selector.
Changed the targetId extraction from:
href?.replace(/^#/, '')
to:
href?.match(/#(.+)$/)?[1]
This properly extracts only the part after the # symbol, resulting in correct selectors like "#main-content".
Addresses Review #43
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent ffab1cf commit 1aaaceb
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
0 commit comments