next.js
7dcd5e56 - Clarify end_column semantics with detailed comments

Commit
49 days ago
Clarify end_column semantics with detailed comments Added comprehensive documentation explaining the inclusive vs exclusive semantics of end_column: **Single-line errors:** - After normalization, end_column is EXCLUSIVE (one past last char) - Example: start=5, end=6 marks exactly column 5 - This matches Rust's range semantics [start, end) **Multiline errors:** - User provides end_column as INCLUSIVE (the last column to mark) - Example: end_column=12 means mark UP TO AND INCLUDING column 12 - We convert to exclusive internally with +1 for consistent calculation **Why the difference?** - Single-line: Matches typical API expectations (like string slicing) - Multiline: More intuitive for users to specify "mark to column 12" - Internal calc uses exclusive ranges for consistency This explains the seemingly inconsistent +1 logic in calculate_marker_position. All 20 tests passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Author
Committer
Parents
Loading