mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 00:26:41 +03:00
fix: sixth review round (verify precision, base-path @fs fallback)
cursor[bot]: - verifyAcceptedSource anchors its param patterns to the exact shapes live mode writes (data-p-x= / [data-p-x] attributes, var(--p-x, ...) references) instead of bare prefixes, shrinking the false-positive class near the completion gate. Note: the reported examples (data-page, var(--primary)) did not actually match the previous hyphenated substrings; the tightening removes the residual class (e.g. a user's own data-p-* attribute) regardless. - With a non-root Vite base, the /@fs/ fallback is tried both under the base and at the server root, covering Vite versions that serve @fs at either location. This work was produced with AI assistance (Claude Code). Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
e5f6d27a9c
commit
f1d450e6ab
@@ -5214,7 +5214,11 @@
|
||||
const candidates = [new URL(base + rel, location.origin).href];
|
||||
if (base !== '/') candidates.push(new URL('/' + rel, location.origin).href);
|
||||
if (absPath) {
|
||||
candidates.push(new URL(base + '@fs/' + String(absPath).replace(/^\/+/, ''), location.origin).href);
|
||||
const fsRel = '@fs/' + String(absPath).replace(/^\/+/, '');
|
||||
candidates.push(new URL(base + fsRel, location.origin).href);
|
||||
// Vite versions differ on whether @fs is served under base or at the
|
||||
// server root; with a non-root base, try both.
|
||||
if (base !== '/') candidates.push(new URL('/' + fsRel, location.origin).href);
|
||||
}
|
||||
return candidates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user