Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Is it your real case or LLM told you to fix it? |
|
@ai This was discovered by an LLM during a proactive source audit, not an issue I encountered in an application. The reproduction removes source offsets to exercise the fallback already covered by the existing word-range test. For |
|
Sorry, not interesting. We are making code more complex without users who need it. Please, stop looking for issues with LLMs. It is bad an unethical practice. |
positionBy({word})andrangeBy({word})fail to locate a word that ends at the last character of a node when a custom syntax omits source offsets. Their source slices treat the inclusive line/column end as exclusive, dropping the final character. Diagnostics then point at the start of the declaration instead of the requested value.Convert line/column end positions to an exclusive slice boundary when searching for words. Explicit source offsets already use exclusive ends and are preserved unchanged.
Validation:
a{color:red}without offsets: the wordredincorrectly resolves to the declaration start.pnpm test:lint,pnpm test:types,pnpm test:size(15.54 kB under16.5 kB), andgit diff --checkpass.Discovery context: this PR was found and implemented by an AI coding agent (
gpt-6.1-sol, xhigh) during source inspection. It was verified with the minimal reproduction and regression tests above. There is no reported production incident or external user report behind this PR.Summary by CodeRabbit