How do I put a hyperlink inside a list in Markdown on GitHub Pages?

Ivan picture Ivan · Sep 21, 2018 · Viewed 19k times · Source

I have tried the following syntax to make a Markdown list item on a GitHub page of mine a hyperlink:

  1. [Caption]: https://example.com
  2. Another list item

Contrary to intuitive expectations it renders into the following HTML code

<ol>
  <li></li>
  <li>Another list item</li>
</ol>

How can this possibly be fixed? Is there a correct syntax for this? My intention was to create a clickable list of sources of the information used to write the article and put it in the bottom part of it.

Answer

Alex Harvey picture Alex Harvey · Sep 21, 2018

It should be:

  1. [Caption](https://example.com)
  2. Another list item