razor icon indicating copy to clipboard operation
razor copied to clipboard

A documentation comment that contains a link is incorrectly displayed on the Razor page (Blazor application)

Open LanetteDevEx opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

The following documentation comment for a Blazor component with a link is displayed incorrectly in Intellisense on the Razor page:

/// <summary> /// See <see cref="MainLayout">Test</see> end of Test. /// </summary>

The same documentation comment is displayed as expected in the .cs file.

See the following screenshots:

Component_in_Razor Component_in_CS

Expected Behavior

A documentation comment should be displayed in Intellisense on a Razon page correctly without the tag: Component_in_CS

Steps To Reproduce

See the following sample project which illustrates the issue for the 'MyComponent' class: https://github.com/LanetteDevEx/Microsoft-Blazor-Issue-Sample-Project/tree/master

Exceptions (if any)

No response

.NET Version

7.0.102

Anything else?

Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.4.4

LanetteDevEx avatar Jul 20 '23 13:07 LanetteDevEx

@phil-allen-msft this is a tooling issue.

mkArtakMSFT avatar Jul 20 '23 16:07 mkArtakMSFT

Our Regex for <see> tags only supports self-closing tags: https://github.com/dotnet/razor/blob/main/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Tooltip/DocCommentHelpers.cs#L16

It also only supports cref but the tag itself supports href and langword too

davidwengier avatar Jan 02 '25 03:01 davidwengier