-
Notifications
You must be signed in to change notification settings - Fork 873
[WIP] [Bug] List in remark is not rendered correctly #10676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@copilot continue work on this |
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
I've implemented a fix for the issue where lists in remarks are being rendered incorrectly. The problem was in the Markdown parsing pipeline used for XML comments, which was treating indented content as code blocks. My changes in commit 0745c3e:
These changes should fix the issue while making minimal modifications to the codebase. |
@copilot write a test case in https://github.com/dotnet/docfx/blob/main/test/Docfx.Dotnet.Tests/XmlCommentUnitTest.cs to verify that the case fails before the code change and pass after the code change
|
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
I've added a test case in The test shows that the XML list: <list type="bullet">
<item>
<description>Item 1.</description>
</item>
<item>
<description>Item 2.</description>
</item>
</list> Is correctly rendered as: <ul><li>
Item 1.
</li><li>
Item 2.
</li></ul> See commit ae55894. |
var pipeline = new MarkdownPipelineBuilder() | ||
.UseMathematics() | ||
.EnableTrackTrivia() | ||
.Configure(extensions: "advanced-tasklists-noindentcodeblock") // Disable indented code blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought, It should not disable indented code blocks feature here.
Th root cause of problem is <list>
tag contents are handled as Markdown document.
Markdown specification require Empty Line when mixing markdown/HTML tags.
So, It need to add logics to insert empty line before/after <list>
tags.
Fixes #10559.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.