问题
I want to use angle brackets in URL on Github Flavor Markdown.
Markdown:
1. Fork it ( http://github.com/<my-github-username>/oooooaaaa/fork )
Expect:
<li>Fork it ( <a href="http://github.com/">http://github.com/<my-github-username>/oooooaaaa/fork</a> )</li>
Actual:
<li>Fork it ( <a href="http://github.com/">http://github.com/</a><my-github-username>/oooooaaaa/fork )</my-github-username></li>
回答1:
Since the angle brackets <
and >
cannot easily be used (or escaped or encoded) in GitHub Flavored Markdown, one workaround would be to used square brackets:
http://github.com/[my-github-username]/oooooaaaa/fork
That does give the expected result:
a href="http://github.com/">http://github.com/[my-github-username]/oooooaaaa/fork</a>
回答2:
Even this example below works as expected.
http://github.com/(my-github-username)/oooooaaaa/fork
回答3:
Using backslash inside a ()[]
construction seems to work. (Tested on GitHub now.) It does not work on SO though.. For example:
1. Fork it ( [http://github.com/\<my-github-username\>/oooooaaaa/fork](http://github.com/\<my-github-username\>/oooooaaaa/fork) )
来源:https://stackoverflow.com/questions/20610244/how-to-use-angle-brackets-in-url-on-github-flavored-markdown