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

Enable spaces in a link/image url #48

Closed
wants to merge 1 commit into from
Closed

Conversation

sbstjn
Copy link

@sbstjn sbstjn commented May 2, 2012

Changed the regular expression for handling links and images, whitespaces are now allowed in a link url or image url. GitHub allows this, so it seems legit to change…

[link text](Link to file/Lorem Ipsum.txt "Alt2") is [link text](Link to file/Lorem Ipsum.txt)

@ashb
Copy link
Collaborator

ashb commented May 3, 2012

Hmmm interesting one.

The original markdown parser didn't accept this, nor do about half the other parsers covered by this babelmark:

http://babelmark.bobtfish.net/?markdown=%5Blink+text%5D%28Link+to+file%2FLorem+Ipsum.txt+%22Alt2%22%29

Spaces in URLs are an abomination but that's a whole other issue :)

@sbstjn
Copy link
Author

sbstjn commented May 3, 2012

Afaik GitHub uses for redcarpet for its Markdown conversion.

In my case I'm linking to local files on a desktop computer's file system. So it's kinda ok to use spaces in links, but of course those links and files with spaces get never deployed into the wild ;)

@evilstreak
Copy link
Owner

I agree with @ashb that spaces in URLs and paths are pretty nasty, but I don't think allowing it does any harm.

@semu I couldn't use your changes as they broke several other link and image tests, but I have added tests and a fix for this request in 8bf9022.

@evilstreak evilstreak closed this Apr 21, 2013
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.

3 participants