Skip to content
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

Add angle brackets around links that contain spaces to increase compatibility #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianselig
Copy link

@christianselig christianselig commented Feb 1, 2022

Hey! Love the project, only catch was for my Reddit app I was getting a few users complaining my Markdown renderer (which uses GitHub's renderer) doesn't render some of your links properly, e.g.: https://www.reddit.com/r/apolloapp/comments/s5tsk9/link_markdown_broken_i_think_it_has_to_do_with/

The "issue" (if you'd call it that) is that when you create the URL to PM you with, you include some JSON there that has spaces in it, which breaks GitHub's Markdown renderer. The Reddit website handles this properly somehow, but I thought I'd make a quick PR that wraps the URLs in <angled brackets> which per Commonmark (which Reddit also supports) allows you to add spaces to URLs for increased compatibility. I updated the tests to reflect this.

tl;dr: shouldn't break anything but should increase compatibility.

@barrycarey
Copy link
Owner

Hey, thanks for the info. I had no idea that was a problem.

Changes look good. I should be able to test them this weekend just to make sure.

@christianselig
Copy link
Author

That's awesome to hear! Let me know if there's anything I can do to help :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants