Conversation
Contributor
Reviewer's GuideThis pull request refactors the TLDR command output formatting by escaping leading dashes and removing superfluous newlines, ensuring better display in Discord and preventing unintended list formatting. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This PR condenses TLDR pages by removing unnecessary newlines and escaping leading dashes to prevent Discord list formatting issues. Key changes include invoking the subprocess for TLDR, processing the output to filter unwanted blank lines, and escaping dashes.
Comments suppressed due to low confidence (1)
tux/cogs/utility/tldr.py:130
- [nitpick] Consider enhancing the inline comment or extracting the condition into a well-named helper function to clarify the intent behind skipping blank lines between a dash and inline code.
if ( not raw.strip() and i > 0 and i < len(lines) - 1 and lines[i - 1].startswith("-") and lines[i + 1].startswith("`") ):
Contributor
There was a problem hiding this comment.
Hey @electron271 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
Author
|
@trunk-io a little late |
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.
Description
closes #842
adds backslash to prevent discord list formatting and removes not needed newlines
Guidelines
My code follows the style guidelines of this project (formatted with Ruff)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation if needed
My changes generate no new warnings
I have tested this change
Any dependent changes have been merged and published in downstream modules
I have added all appropriate labels to this PR
I have followed all of these guidelines.
How Has This Been Tested? (if applicable)
ran /tldr test
Screenshots (if applicable)
before and after


Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Improve formatting of tldr command output to enhance readability and compatibility with Discord.
Bug Fixes: