diff --git a/src/OmniSharp.Roslyn.CSharp/Services/DocumentationConverter.cs b/src/OmniSharp.Roslyn.CSharp/Services/DocumentationConverter.cs index 261f6f53e3..3f667c36e6 100644 --- a/src/OmniSharp.Roslyn.CSharp/Services/DocumentationConverter.cs +++ b/src/OmniSharp.Roslyn.CSharp/Services/DocumentationConverter.cs @@ -65,6 +65,7 @@ public static string ConvertDocumentation(string xmlDocumentation, string lineEn break; case "paramref": ret.Append(xml["name"]); + ret.Append(" "); break; case "param": ret.Append(lineEnding); diff --git a/tests/OmniSharp.Roslyn.CSharp.Tests/DocumentationConverterFacts.cs b/tests/OmniSharp.Roslyn.CSharp.Tests/DocumentationConverterFacts.cs index 40906e533e..b5a2d1320d 100644 --- a/tests/OmniSharp.Roslyn.CSharp.Tests/DocumentationConverterFacts.cs +++ b/tests/OmniSharp.Roslyn.CSharp.Tests/DocumentationConverterFacts.cs @@ -44,5 +44,19 @@ static int Main() "; Assert.Equal(expected, plainText, ignoreLineEndingDifferences: true); } + + [Fact] + public void Has_correct_spacing_around_paramref() + { + var documentation = @" +DoWork is a method in the TestClass class. +The parameter takes a number and takes a string. +"; + var plainText = DocumentationConverter.ConvertDocumentation(documentation, "\n"); + var expected = +@"DoWork is a method in the TestClass class. +The arg parameter takes a number and arg2 takes a string."; + Assert.Equal(expected, plainText, ignoreLineEndingDifferences: true); + } } }