Skip to content

Commit

Permalink
Merge pull request #670 from filipw/bugfix/vscode-672
Browse files Browse the repository at this point in the history
Missing space in <paramref />
  • Loading branch information
DustinCampbell authored Nov 16, 2016
2 parents 52d236a + 67675a5 commit 7b61348
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 14 additions & 0 deletions tests/OmniSharp.Roslyn.CSharp.Tests/DocumentationConverterFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,19 @@ static int Main()
";
Assert.Equal(expected, plainText, ignoreLineEndingDifferences: true);
}

[Fact]
public void Has_correct_spacing_around_paramref()
{
var documentation = @"
<summary>DoWork is a method in the TestClass class.
The <paramref name=""arg""/> parameter takes a number and <paramref name=""arg2""/> takes a string.
</summary>";
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);
}
}
}

0 comments on commit 7b61348

Please sign in to comment.