-
Notifications
You must be signed in to change notification settings - Fork 420
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
VS Code Issue 1057 - Problem with Newlines in displaying XML Documentation #1019
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Composition; | ||
using System; | ||
using System.Composition; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.FindSymbols; | ||
|
@@ -45,7 +46,9 @@ public async Task<TypeLookupResponse> Handle(TypeLookupRequest request) | |
|
||
if (request.IncludeDocumentation) | ||
{ | ||
response.Documentation = DocumentationConverter.ConvertDocumentation(symbol.GetDocumentationCommentXml(), _formattingOptions.NewLine); | ||
string newLine = Environment.NewLine + Environment.NewLine; | ||
//VS Code renders a single new line for two newline sequences in the response, hence two new lines are passed in the lineEnding parameter | ||
response.Documentation = DocumentationConverter.ConvertDocumentation(symbol.GetDocumentationCommentXml(),newLine); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add space before 'newLine' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, if this is a VS Code-specific bug then we should move the fix to omnisharp-vscode. We can capture the output coming from O# and map it to what VS Code expects. |
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a VS Code-specific tweak, why does it belong in omnisharp-roslyn? Shouldn't the fix be in omnisharp-vscode? After all, other editors use omnisharp-roslyn (e.g. Emacs, Vim, Atom, Sublime, etc.). Wouldn't this be a breaking change for them?