Skip to content

Conversation

@dibarbet
Copy link
Member

@dibarbet dibarbet commented May 1, 2025

Resolves dotnet/vscode-csharp#8204

Supported platform information uses 4 spaces in its resource string {0} - {1} for indentation in tool tips. However, 4 spaces at the beginning of the line in markdown indicates a code block, breaking the rendering of the supported platform info in LSP (thanks to @JoeRobich for spotting that!)

Since the 4 spaces are intended to be structural indentation, we need to use non breaking spaces (&nbsp) in markdown. We already handle that generally when we see a TextTags.Space kind. However in this case the 4 spaces were combined with the rest of the string and therefore tagged as Text instead of Space

The fix is to separate out the structural spacing from the rest of the string, and tag it as such. This lets our existing handling of spaces convert to non breaking spaces when it needs to.

@dibarbet dibarbet requested a review from a team as a code owner May 1, 2025 23:54
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 1, 2025
foreach (var project in projects)
{
var text = string.Format(FeaturesResources._0_1, project.Name, Supported(!InvalidProjects.Contains(project.Id)));
builder.AddSpace(" ");
Copy link
Member Author

Choose a reason for hiding this comment

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

moved the indentation from the resource string to here, so it gets properly tagged as spacing.

@CyrusNajmabadi
Copy link
Member

Probably my bad. Thanks!

@dibarbet
Copy link
Member Author

dibarbet commented May 3, 2025

/azp run roslyn-CI

@dibarbet
Copy link
Member Author

dibarbet commented May 3, 2025

/azp run roslyn-integration-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dibarbet
Copy link
Member Author

dibarbet commented May 3, 2025

/azp run roslyn-integration-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dibarbet dibarbet enabled auto-merge May 3, 2025 20:20
@dibarbet dibarbet merged commit 7a2a85c into dotnet:main May 3, 2025
24 of 25 checks passed
@dibarbet dibarbet deleted the fix_hover_supported_platforms branch May 3, 2025 21:46
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone May 3, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect markdown escaping in completion documentation

4 participants