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

In XML documentation, URL tag damaged when followed by a period #7937

Closed
hhmmjjnn opened this issue Jan 20, 2025 · 3 comments
Closed

In XML documentation, URL tag damaged when followed by a period #7937

hhmmjjnn opened this issue Jan 20, 2025 · 3 comments

Comments

@hhmmjjnn
Copy link

hhmmjjnn commented Jan 20, 2025

Type: Bug

Issue Description

See below.

Steps to Reproduce

/// <summary>
/// <see href="https://example.net/eol/"/>
/// <br />
/// <see href="https://example.net/dot-eol/"/>.
/// <br />
/// <see href="https://example.net/X-eol/"/>X
/// <br />
/// <see href="https://example.net/dot-X-eol/"/>.X
/// <br />
/// <see href="https://example.net/space-dot-eol/"/> .
/// </summary>
class Foo {}

Image

Image

Expected Behavior

Tag should have been unaffected by whatever follows it.

Visual Studio doesn't have this problem:

Image

Actual Behavior

URL tag is damaged whenever it's immediately followed by a period (“.” U+002E FULL STOP) then end-of-line.

A mysterious slash (“\” U+005C REVERSE SOLIDUS) is appended to the URL.

Environment information

VSCode version: 1.96.2
C# Extension: 2.55.28
Using OmniSharp: true

Dotnet Information .NET SDK: Version: 8.0.404 Commit: 7b190310f2 Workload version: 8.0.400-manifests.996cfe54 MSBuild version: 17.11.9+a69bbaaf5

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.404\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[wasm-tools-net6]
Installation Source: VS 17.7.34018.315
Manifest Version: 8.0.11/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.11\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.11
Architecture: x64
Commit: 9cb3b725e3

.NET SDKs installed:
7.0.400 [C:\Program Files\dotnet\sdk]
8.0.111 [C:\Program Files\dotnet\sdk]
8.0.404 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@hhmmjjnn
Copy link
Author

/// <summary>
/// <see href="https://example.net/dot-space-X-eol/"/>. X
/// </summary>
class Foo {}

VSCode:
Image

VS:
Image

I think it has more to do with word boundaries, rather than line boundaries.

@dibarbet
Copy link
Member

I can't reproduce this myself. We do use markdown syntax to provide the link, but there is some escape involved. However even with exactly your example, I cannot reproduce this.

Image

[Trace - 5:10:57 PM] Received response 'textDocument/hover - (658)' in 2ms.
Result: {
    "contents": {
        "kind": "markdown",
        "value": "```csharp\r\nclass Foo\r\n```\r\n  \r\n[https://example\\.net/dot\\-space\\-X\\-eol/](https://example.net/dot-space-X-eol/)\\. X  \r\n"
    },
    "range": {
        "start": {
            "line": 315,
            "character": 8
        },
        "end": {
            "line": 315,
            "character": 11
        }
    }
}

@dibarbet
Copy link
Member

Ah just saw you were using O#. I can reproduce this in O# as well. The Roslyn LSP server functions correctly here. Created OmniSharp/omnisharp-roslyn#2654 on the O# side to track.

@dibarbet dibarbet closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants