Search code examples
githubgithub-flavored-markdown

Is there a way to begin GFM ordered lists at 0?


Is it possible to have an ordered list in Github Flavored Markdown that begins with '0'?

Just typing 0. at the beginning is getting rendered as '1.'


Solution

  • Considered GitHub Flavored Markdown (GFM) is markdown plus a few features, the answer would be the same as for "Begin ordered list from 0 in Markdown":

    If you want to start at certain number, unfortunately, you have to use pure HTML and write:

    <ol start="0">
      <li>Item 0</li>
      <li>Item 1</li>
      <li>Item 2</li>
    </ol>