Skip to content

Commit

Permalink
Configuration schema generator: fix missing cref inside para tag (#5800)
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-vmware authored Sep 24, 2024
1 parent 3f38298 commit b2b095f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ private static string GetElementText(XElement element)
{
if (element.Name == "para" || element.Name == "p")
{
return $"<br/><br/>{element.Value}<br/><br/>";
var innerText = string.Join(string.Empty, element.Nodes().Select(GetNodeText));
return $"<br/><br/>{innerText}<br/><br/>";
}

if (element.Name == "br")
Expand Down
1 change: 1 addition & 0 deletions tests/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void ShouldStripHtmlTags(string input, string expected)
[InlineData("<see cref=\"M:System.Diagnostics.Debug.Assert(bool)\"/>", "'System.Diagnostics.Debug.Assert(bool)'")]
[InlineData("<see cref=\"E:System.Windows.Input.ICommand.CanExecuteChanged\"/>", "'System.Windows.Input.ICommand.CanExecuteChanged'")]
[InlineData("<exception cref=\"T:System.InvalidOperationException\" />", "'System.InvalidOperationException'")]
[InlineData("<para><exception cref=\"T:System.InvalidOperationException\" /></para>", "'System.InvalidOperationException'")]
public void ShouldQuoteCrefAttributes(string input, string expected)
{
var summaryElement = ConvertToSummaryElement(input);
Expand Down

0 comments on commit b2b095f

Please sign in to comment.