Skip to content

fix(issues): resolve issue end column against its own line - #871

Draft
caugner wants to merge 1 commit into
mainfrom
issue-end-column-per-line
Draft

fix(issues): resolve issue end column against its own line#871
caugner wants to merge 1 commit into
mainfrom
issue-end-column-per-line

Conversation

@caugner

@caugner caugner commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Resolve an issue's end column against the line given by end_line instead of the start line, by extracting the byte-to-character conversion into char_columns.

Motivation

Ensure the end column of an issue spanning multiple lines is converted against the line it actually belongs to, instead of pointing past the end of the start line.

Additional details

No change on current content: a full en-US build (1052 issues in 397 files) reports identical flaws before and after. Multi-line issues don't occur in en-US today, but multi-line links exist in translated-content, and macros can span lines (#872).

Related issues and pull requests

Relates to #872.

`DIssue::from_issue` converted both the start and the end byte column to
character columns against the start line's content. An issue can span
lines, in which case `end_col` is a byte column within `end_line`, so
the conversion used the wrong line and could report an end column past
the end of that line.

Extract the conversion into `char_columns` and resolve `end_line`
separately.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

a218c5a was deployed to: https://rari-pr871.review.mdn.allizom.net/

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.

2 participants