Commit 456df27
fix(platforms): match middle components in platform suggestions (Sentry CLI-WD)
When a user types an invalid platform like 'javascript-cloudflare', the
suggestion system failed to suggest 'node-cloudflare-workers' and
'node-cloudflare-pages' because 'cloudflare' appears as a middle
component (between dashes), not as a prefix or suffix.
Added middle-component matching in findSwapMatches() so that the suffix
after the first dash is also checked as a substring between dashes in
valid platform names.
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>1 parent 4c837ac commit 456df27
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| 218 | + | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
0 commit comments