fix: strip inline code and unterminated HTML comments in parseClosesIssue#350
Merged
Conversation
…ssue Two over-block cases in the routine gate's Closes-ref parser caused false escalations (#309): 1. `Closes #N` inside a backtick inline code span or fenced code block was treated as a real ref; now stripped before matching. 2. An unterminated `<!--` left a Closes ref visible; now stripped to end-of-line so the PR author's intent (comment it out) is honoured. Fail-closed guarantee is preserved: genuinely ambiguous bodies (multiple distinct real refs) still return null. Closes #309 https://claude.ai/code/session_019RpMnK4fQgn6W5k6QXKckU
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
dmarcheck | 167bb2c | May 21 2026, 02:14 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`Closes #N`) and triple-backtick fenced code blocks before matchingCloses #Nrefs — eliminates false-positive refs from code examples in PR bodies.<!--with no closing-->) to end-of-line, so a forgotten<!--on a template line no longer poisons the ref count.null.Closes #309
Test plan
"Example: \Closes #999`\n\nCloses perf: MX-informed DKIM selector prioritization #42"→ returns42` (inline code stripped)"```\nCloses #999\n```\n\nCloses #42"→ returns42(fenced block stripped)"<!-- Closes #999\n\nCloses #42"→ returns42(unterminated comment stripped to EOL)"Closes #42\nCloses #999"→ returnsnull(still fail-closed on genuinely ambiguous)npx vitest run --project node)Deferred
~~~) and nested backtick code spans — not referenced in the issue; out of scope per issue spec.Closesrefs on interior lines — remain fail-closed (degenerate case; safe over-block).https://claude.ai/code/session_019RpMnK4fQgn6W5k6QXKckU
Generated by Claude Code