Skip to content

fix: ignore blank external link rules - #125

Open
t91a60 wants to merge 1 commit into
BossSloth:mainfrom
t91a60:fix/empty-external-link-rules
Open

t91a60 wants to merge 1 commit into
BossSloth:mainfrom
t91a60:fix/empty-external-link-rules

Conversation

@t91a60

@t91a60 t91a60 commented Oct 17, 2026

Copy link
Copy Markdown

Adding an external-link row and leaving it blank can persist { "match": "", "isRegex": false } on blur. Since href.includes('') is true for every URL, this makes ordinary Steam links open externally. Empty regexes have the same effect.

Ignore empty and whitespace-only rules when matching. Existing saved lists do not need to be reset; nonblank patterns are unchanged, including explicit match-all regexes.

Eight regression tests pass, covering blank text/regex rules, mixed lists, explicit match-all patterns, and current-tab behavior. An isolated Chromium fixture reproduces both empty-rule failures before the fix and passes all four browser cases afterward, with no console errors. The location destination is captured rather than sent to Steam.

bun run build, bun run lint, bun run check, test TypeScript checking, formatting checks, and git diff --check pass in an LF checkout. The build retains the existing circular-dependency warning. Steam/Millennium integration remains untested.

Related: #33, #35, #118. Those reports describe the same symptom, but do not establish that blank rules caused their individual cases.

@t91a60
t91a60 marked this pull request as ready for review October 17, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant