-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
[Enhancement] support for markdown code blocks on old.reddit.com #5223
Comments
Can I echo a need for this? People using Markdown code fences is super annoying on old Reddit. If RES could auto-format those, it would be amazing! |
I think we could reuse the Markdown generator for this. It's already being used for showing the post preview. We could do it like this:
The replacement part is trivial (this one adds extra linebreaks to ensure there's at least one linebreak in between, which doesn't matter since the additional linebreaks are ignored). |
Would still love to have this. As more people are using the new ``` code formatting style, coding subreddits are becoming increasingly unreadable. |
A fix for this issue would be a huge relief. I run into malformed code blocks multiple times a day and at the moment I need to copy/paste them into my editor to see them properly. As an aside, has anyone found a workaround, like a browser extension or user script? |
The workaround I currently use is to click on |
Okay, I decided to try my hand at it. It seems this should be mostly easy, surprisingly, considering this has given me much consternation in the past (and many others, evidenced by u/backtickbot)
This module works for replacing text content, but it seems
|
EDIT: had a typo. Got this implemented. |
Only on the first code block and then ones which have a newline after the first backticks? seems very strange,
|
So apparently the new reddit has support for code blocks using triple backticks like in regular markdown, but this has not been added on old.reddit.com. Maybe it would be nice to add something like this to RES? Perhaps even with syntax highlighting using something like highlight.js.
The text was updated successfully, but these errors were encountered: