Links containing parens, in Markdown

I'm writing Your First Product (the book, not the website) in markdown. (Okay - the site is mostly written in markdown too, but I digress)... there was a url that ends with a closing parenthesis.

The markdown parser in gitbook did not understand this (although the one in pandoc did). To make it work everywhere I had to encode the parens as %20 and %29 respectively.

So:

'[reciprocity](http://en.wikipedia.org/wiki/Reciprocity_(social_psychology))'

...linked to:

http://en.wikipedia.org/wiki/Reciprocity_(social_psychology

...and displayed as:

'reciprocity)'

Whereas:

'[reciprocity](http://en.wikipedia.org/wiki/Reciprocity_%28social_psychology%29)'

...worked correctly and displayed correctly.

Compare 'reciprocity)' to 'reciprocity'

Lesson: consider encoding ( and ) as %28 and %29 in urls.

Source

results matching ""

    No results matching ""