Skip to content

Display selected lines from our pastebin as codeblock#3310

Merged
ChrisLovering merged 2 commits intomainfrom
vivek/pastebin-codeblock
May 31, 2025
Merged

Display selected lines from our pastebin as codeblock#3310
ChrisLovering merged 2 commits intomainfrom
vivek/pastebin-codeblock

Conversation

@vivekashok1221
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread bot/exts/info/code_snippets.py Outdated
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
Copy Markdown
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

@ChrisLovering ChrisLovering merged commit 0112e55 into main May 31, 2025
5 checks passed
@ChrisLovering ChrisLovering deleted the vivek/pastebin-codeblock branch May 31, 2025 08:53
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

4 participants