From ead85199c1e79034dd238fd5ae6a70e5826b2819 Mon Sep 17 00:00:00 2001 From: Bart Koelman <104792814+bart-vmware@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:55:11 +0200 Subject: [PATCH] Configuration schema generator: fix missing cref inside para tag --- .../src/ConfigurationSchemaGenerator/ConfigSchemaEmitter.cs | 3 ++- .../test/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tools/src/ConfigurationSchemaGenerator/ConfigSchemaEmitter.cs b/src/Tools/src/ConfigurationSchemaGenerator/ConfigSchemaEmitter.cs index ac8cc6b2b7..c836d65f68 100644 --- a/src/Tools/src/ConfigurationSchemaGenerator/ConfigSchemaEmitter.cs +++ b/src/Tools/src/ConfigurationSchemaGenerator/ConfigSchemaEmitter.cs @@ -548,7 +548,8 @@ private static string GetElementText(XElement element) { if (element.Name == "para" || element.Name == "p") { - return $"

{element.Value}

"; + var innerText = string.Join(string.Empty, element.Nodes().Select(node => GetNodeText(node))); + return $"

{innerText}

"; } if (element.Name == "br") diff --git a/src/Tools/test/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs b/src/Tools/test/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs index c4f6a6b2c9..88fc041ef6 100644 --- a/src/Tools/test/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs +++ b/src/Tools/test/ConfigurationSchemaGenerator.Tests/GeneratorTests.cs @@ -127,6 +127,7 @@ public void ShouldStripHtmlTags(string input, string expected) [InlineData("", "'System.Diagnostics.Debug.Assert(bool)'")] [InlineData("", "'System.Windows.Input.ICommand.CanExecuteChanged'")] [InlineData("", "'System.InvalidOperationException'")] + [InlineData("", "'System.InvalidOperationException'")] public void ShouldQuoteCrefAttributes(string input, string expected) { var summaryElement = ConvertToSummaryElement(input);