-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix(tldr): condense tldr pages #851
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
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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("`") ):
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.
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.
|
@trunk-io a little late |
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: