File tree Expand file tree Collapse file tree
src/OmniSharp.Roslyn.CSharp/Helpers
tests/OmniSharp.Roslyn.CSharp.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,6 +198,11 @@ public static void TaggedTextToMarkdown(
198198 endBlock ( ) ;
199199 }
200200
201+ if ( ! brokeLine && markdownFormat == MarkdownFormat . Italicize )
202+ {
203+ stringBuilder . Append ( "_" ) ;
204+ }
205+
201206 return ;
202207
203208 void addText ( string text )
Original file line number Diff line number Diff line change @@ -709,6 +709,23 @@ public static void A()
709709 Assert . Equal ( "```csharp\n void Program.B()\n ```\n \n \\ *This should be escaped\\ *" , response . Markdown ) ;
710710 }
711711
712+ [ Fact ]
713+ public async Task NullableIsItalicized ( )
714+ {
715+ string content = @"
716+ #nullable enable
717+ class Program
718+ {
719+ public static void A(string s)
720+ {
721+ _ = s$$;
722+ }
723+
724+ }" ;
725+ var response = await GetTypeLookUpResponse ( content ) ;
726+ Assert . Equal ( "```csharp\n (local) string? s\n ```\n \n _'s' is not null here._" , response . Markdown ) ;
727+ }
728+
712729 private async Task < QuickInfoResponse > GetTypeLookUpResponse ( string content )
713730 {
714731 TestFile testFile = new TestFile ( "dummy.cs" , content ) ;
You can’t perform that action at this time.
0 commit comments