Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape parentheses in github markdown

I have the following line on a markdown text file:

[Recursively] (http://en.wikipedia.org/wiki/Recursion_(computer_science))

When it's rendered the parser breaks the link by picking the first closing parenthesis instead of the second.

The link ends up as http://en.wikipedia.org/wiki/Recursion_(computer_science instead of http://en.wikipedia.org/wiki/Recursion_(computer_science)

How do I escape the first closing bracket?

I have tried using a backslash and using backticks but they don't work.

like image 795
mattgathu Avatar asked Nov 02 '14 10:11

mattgathu


People also ask

How do you escape a hash character in markdown?

In Markdown, you can escape various characters using a backslash ( \ ), so if you wanted to type C#, you would use C\# .

How do I cross out text in GitHub?

In order to create a crossed-out text, use the tilde in Markdown twice in a row, followed by the respective text and then another two tildes. ~~This text is struckthrough. ~~ This one isn't. ~~This text is struckthrough.

How do you use angle brackets in markdown?

Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. < , and & .


1 Answers

I found a detailed answer and insight of this issue here

Here is a snippet 1. Bare - http://example.com/test(1).html 2. Bare, encoded - http://example.com/test%281%29.html 3. Delimited - <http://example.com/test(1).html> 4. Hyperlink - with <a href="http://example.com/test(1).html">parens</a> 5. Markdown Link #1 - with [parens][1] 6. Markdown Link #1 - with [parens at end][2] 7. Markdown Link #2 - with [parens](http://example.com/test(1).html) 8. Markdown Link #2 - with [parens at end](http://example.com/test(1))

  1. Bare - http://example.com/test(1).html
  2. Bare, encoded - http://example.com/test%281%29.html
  3. Delimited - http://example.com/test(1).html
  4. Hyperlink - with parens
  5. Markdown Link #1 - with parens
  6. Markdown Link #1 - with parens at end
  7. Markdown Link #2 - with parens
  8. Markdown Link #2 - with parens at end
like image 69
mattgathu Avatar answered Sep 20 '22 08:09

mattgathu