dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 673 forks source link

XML documentation doesn't render properly in the intellisense preview #3884

Open cschierig opened 4 years ago

cschierig commented 4 years ago

Issue Description

XML documentation comment <code> and <c> tags don't get rendered as code in the IntelliSense preview.

/// <value>Gets the expected <c>Token</c></value>
/// <example>
/// <code>
/// test
/// </code>
/// </example>
public Token expectedToken { get; }

This code gets shown like this:

intellisense

Neither the text in the text in the <code> nor the one in the <c> tag get written as plain text.

The next image shows an example of how the IntelliSense preview looks when writing Haskell code using alanz/vscode-hie-server.

Screenshot (20)

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.46.1 C# Extension: 1.22.1

Dotnet Information .NET Core SDK (gem�� "global.json"): Version: 5.0.100-preview.5.20279.10 Commit: 8139f1b74e Laufzeitumgebung: OS Name: Windows OS Version: 10.0.19041 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.100-preview.5.20279.10\ Host (useful for support): Version: 5.0.0-preview.5.20278.1 Commit: 4ae4e2fe08 .NET SDKs installed: 3.1.100 [C:\Program Files\dotnet\sdk] 3.1.300 [C:\Program Files\dotnet\sdk] 5.0.100-preview.5.20279.10 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.0-preview.5.20279.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.0-preview.5.20278.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.0-preview.5.20278.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |abnf|forivall|1.0.0| |auto-rename-tag|formulahendry|0.1.3| |bash-ide-vscode|mads-hartmann|1.10.2| |beautify|HookyQR|1.5.0| |better-comments|aaron-bond|2.0.5| |bracket-pair-colorizer-2|CoenraadS|0.1.4| |code-settings-sync|Shan|3.4.3| |code-spell-checker|streetsidesoftware|1.9.0| |colonize|vmsynkov|2.2.2| |csharp|ms-dotnettools|1.22.1| |csharpextensions|jchannon|1.3.1| |docomment|k--kato|0.1.13| |dotnet-test-explorer|formulahendry|0.7.3| |EditorConfig|EditorConfig|0.15.1| |errorlens|usernamehw|3.1.1| |gc-excelviewer|GrapeCity|3.0.37| |git-graph|mhutchie|1.24.0| |gitignore|codezombiech|0.6.0| |gitlens|eamodio|10.2.2| |jinja|wholroyd|0.0.8| |js-debug-nightly|ms-vscode|2020.6.2917| |language-haskell|justusadam|3.3.0| |language-x86-64-assembly|13xforever|2.3.0| |markdown-all-in-one|yzhang|3.1.0| |material-icon-theme|PKief|4.2.0| |msbuild-project-tools|tintoy|0.3.6| |npm-intellisense|christian-kohler|1.3.0| |open-in-browser|techer|2.0.0| |output-colorizer|IBM|0.1.2| |path-autocomplete|ionutvmi|1.13.6| |penguor|carl-schierig|0.0.3| |project-manager|alefragnani|11.1.0| |python|ms-python|2020.6.90262| |remote-wsl|ms-vscode-remote|0.44.4| |restructuredtext|lextudio|128.0.0| |rewrap|stkb|1.12.0| |search-node-modules|jasonnutter|1.3.0| |sort-lines|Tyriar|1.9.0| |TabOut|albert|0.2.0| |tinypng|andi1984|0.3.3| |todo-tree|Gruntfuggly|0.0.177| |turbo-console-log|ChakrounAnas|1.4.0| |vsc-material-theme|Equinusocio|32.8.0| |vscode-colorize|kamikillerto|0.8.17| |vscode-counter|uctakeoff|1.3.5| |vscode-csharp-snippets|jorgeserrano|0.3.1| |vscode-eslint|dbaeumer|2.1.5| |vscode-html-css|ecmel|0.2.3| |vscode-jumpy|wmaurer|0.3.1| |vscode-markdownlint|DavidAnson|0.36.1| |vscode-npm-script|eg2|0.3.12| |vscode-nuget-package-manager|jmrog|1.1.6| |vscode-solution-explorer|fernandoescolar|0.3.10| |vscode-xml|redhat|0.12.0| |vscode-yaml|redhat|0.8.0| |zenscript|yesterday17|0.2.6|;
JoeRobich commented 4 years ago

Note that the Hover returned by HoverProvider can use MarkdownString to embed code blocks - https://code.visualstudio.com/api/references/vscode-api#MarkdownString