Skip to content

Marker message white-space nowrap -> pre#229454

Merged
sandy081 merged 4 commits intomicrosoft:mainfrom
trevor-scheer:main
Oct 21, 2024
Merged

Marker message white-space nowrap -> pre#229454
sandy081 merged 4 commits intomicrosoft:mainfrom
trevor-scheer:main

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

Fixes #229112

The mentioned issue highlights a collapsing of whitespace for issues in the problems pane
369208626-66054e06-af61-4508-9c5e-3354f25ae205

The use of whitespace: nowrap is inappropriate here, since it collapses desirable whitespace (both leading and internal) for each line of the problem.

The following table from MDN lays out our options.

nowrap doesn't preserve whitespace (bad), but it does prevent text wrapping (good)
pre does preserve whitespace, while also preventing text wrapping

New lines Spaces and tabs Text wrapping End-of-line spaces End-of-line other space separators
normal Collapse Collapse Wrap Remove Hang
nowrap Collapse Collapse No wrap Remove Hang
pre Preserve Preserve No wrap Preserve No wrap
pre-wrap Preserve Preserve Wrap Hang Hang
pre-line Preserve Collapse Wrap Remove Hang
break-spaces Preserve Preserve Wrap Wrap Wrap

I'm not sure what I need to do to run my build of VS Code locally with the extension I'm using that publishes this particular diagnostic from my reproduction. Here is a screenshot of making the suggested change to the CSS with the dev tools. You can see the desired leading whitespace is no longer collapsed on the error pane.

Screenshot 2024-09-23 at 4 05 27 PM

@Yoyokrazy Yoyokrazy assigned sandy081 and unassigned Yoyokrazy Sep 24, 2024
@sandy081 sandy081 added this to the October 2024 milestone Sep 25, 2024
@sandy081 sandy081 closed this Oct 21, 2024
@sandy081 sandy081 reopened this Oct 21, 2024
@sandy081 sandy081 enabled auto-merge October 21, 2024 15:08
@sandy081 sandy081 merged commit 2772c1d into microsoft:main Oct 21, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problems pane collapses whitespace

4 participants