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 %28 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' to see if the current toolchain for TIL is working ok. (It is, thanks clowncar and markdig.)

Test it here without encoding and here with encoding

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

Source