Skip to content

fix: remove extra space in inline label lines - #98

Merged
johnyob merged 1 commit into
johnyob:mainfrom
WardBrian:fix-extra-space
Aug 5, 2026
Merged

fix: remove extra space in inline label lines#98
johnyob merged 1 commit into
johnyob:mainfrom
WardBrian:fix-extra-space

Conversation

@WardBrian

@WardBrian WardBrian commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

I spotted this in #97 (comment) but it turns out it was also impacting the existing tests.

Basically, by adding a space in pp_trailing_label, the start location of all boxes inside the message start 1 character too far over for inline labels. E.g., even though it is in a <v2>, new line of error1 was 3 columns indented relative to e1:.

Instead, we can print that space after the carets and before the inline label and get the expected behavior

@johnyob johnyob left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously correct 🙏

lgtm 🚀 🚢

@johnyob
johnyob merged commit d42a13d into johnyob:main Aug 5, 2026
7 checks passed
@WardBrian
WardBrian deleted the fix-extra-space branch August 5, 2026 14:43
shonfeder pushed a commit to ocaml/opam-repository that referenced this pull request Aug 6, 2026
CHANGES:

- fix(renderer): adjust margin for messages near end of line ([johnyob/grace#97](johnyob/grace#97))
- fix(renderer): remove extra space in trailing labels ([johnyob/grace#98](johnyob/grace#98))
- fix(renderer): error recovery on invalid UTF-8 strings ([johnyob/grace#99](johnyob/grace#99))
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