diff --git a/test/Docfx.Dotnet.Tests/XmlCommentUnitTest.cs b/test/Docfx.Dotnet.Tests/XmlCommentUnitTest.cs index 08a40e9ce7e..ab2028257d0 100644 --- a/test/Docfx.Dotnet.Tests/XmlCommentUnitTest.cs +++ b/test/Docfx.Dotnet.Tests/XmlCommentUnitTest.cs @@ -487,4 +487,47 @@ public void ParseXmlCommentWithoutRootNode() var commentModel = XmlComment.Parse(input, new XmlCommentParserContext()); Assert.Equal("A", commentModel.Summary); } + + [Fact] + public void Issue9495() + { + var comment = XmlComment.Parse( + """ + + + + + """); + Assert.Equal( + """ +
options.UseRelativeLinks = true;
+
{
+              "type": "articles",
+              "id": "4309",
+              "relationships": {
+                 "author": {
+                   "links": {
+                     "self": "/api/shopping/articles/4309/relationships/author",
+                     "related": "/api/shopping/articles/4309/author"
+                   }
+                 }
+              }
+            }
+ """, comment.Examples[0]); + } }