Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor diagnostic rendering issues #439

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix minor diagnostic rendering issues #439

wants to merge 2 commits into from

Conversation

mcy
Copy link
Member

@mcy mcy commented Jan 31, 2025

While writing diagnostics in another PR, I noticed two small bugs:

  1. Multiline pipes are not rendered correctly in color mode.
  2. A span consisting of a single newline generates an ugly multi-line diagnostic.

This PR fixes both issues.

@@ -2,7 +2,19 @@ remark: "proto4" isn't real, it can't hurt you
--> foo.proto:1:10
|
1 | syntax = "proto4"
| ^^^^^^^^ help: change this to "proto5"
| ^^^^^^^^^ help: change this to "proto5"
Copy link
Contributor

Choose a reason for hiding this comment

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

This change to ^^^^^^^^^ looks one too long.

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