Skip to content

Display selected lines from our pastebin as codeblock #3310

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vivekashok1221
Copy link
Member

Closes #2679

This PR adds support for paste.pythondiscord.com /paste.pydis.wtf paste links to the CodeSnippets cog.
The pastebin we use supports selecting lines across multiple files, which, AFAIK, the other services in this cog don't support.

image

Note: When selecting only a single line, the website generates the link as: https://paste.pythondiscord.com/EMJQ#1L2-L2. Technically, a link like https://paste.pythondiscord.com/EMJQ#1L2 is also valid, but it would need to be manually typed by the user that way. Links in this format will not be displayed as codeblocks since unlikely that someone will send such a link.

Copy link
Member

@anand2312 anand2312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small fix

Co-authored-by: Anand <40204976+anand2312@users.noreply.github.com>
@vivekashok1221 vivekashok1221 added the s: needs review Author is waiting for someone to review and approve label Apr 12, 2025
Copy link
Member

@anand2312 anand2312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: needs review Author is waiting for someone to review and approve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code snippets for paste service links
3 participants