Commit abeec05
AFDocs fixes: avoid redirect-behavior false positive in anchor copy handler (#130)
Replace `window.location.href = href` with `window.location.hash = url.hash`
in the heading anchor click handler. The old pattern triggered the afdocs
`redirect-behavior` check, which heuristically scans the first 10 KB of HTML
for `location.href =` assignments and classifies any match as a JavaScript
redirect. Since anchor links are always fragment-only, `location.hash` is
functionally equivalent and avoids the false positive.
Co-authored-by: Oz <oz-agent@warp.dev>1 parent fb574ac commit abeec05
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
0 commit comments