Fix bad truncation html formatting around </details> in primer comments#10932
Merged
Pierre-Sassoulas merged 2 commits intopylint-dev:mainfrom Mar 21, 2026
Merged
Conversation
- Remove extra blank line between header and first package section - Remove blank lines inside <details> blocks for cleaner markdown - Fix duplicate </details> when new_messages exist but missing_messages don't (checked `missing_messages` dict truthiness instead of `missing_messages["messages"]`)
Comment on lines
-13
to
-16
|
|
||
| </details> | ||
|
|
||
|
|
Member
Author
There was a problem hiding this comment.
The actual bug, everything else is "style"
This comment has been minimized.
This comment has been minimized.
When truncation cuts inside an open <details> block, the closing tag was missing, causing GitHub to render the rest of the PR comment inside the collapsed section. Now detect the open tag and close it before appending the truncation notice. Add a dedicated test case for this.
Comment on lines
+8
to
+11
| <details> | ||
| 1) locally-disabled: | ||
| *Locally disabling redefined-builtin [we added some text in the message... | ||
| </details> |
Member
Author
There was a problem hiding this comment.
This would not have been closed properly previousely.
Contributor
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit b8279be |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10932 +/- ##
=======================================
Coverage 96.16% 96.16%
=======================================
Files 178 178
Lines 19627 19632 +5
=======================================
+ Hits 18875 18880 +5
Misses 752 752
🚀 New features to boost your workflow:
|
DanielNoord
approved these changes
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Changes
Description
Details
blocks and between sectionsDetails
tag left open when a comment is truncated mid-block, preventing the rest of the PR page from collapsing into the hidden sectionThis is a small fix before tackling #10914