NanoFile

Markdown lists

A dash and a space makes a bullet. A number, a dot and a space makes a numbered list. Nesting works by indenting, and the amount of indentation is where it usually goes wrong.

Bulleted
- first
- second
- third
  • first
  • second
  • third

`*` and `+` do the same thing. Pick one and stay with it.

Numbered
1. first
2. second
3. third
  1. first
  2. second
  3. third
Lazy numbering
1. first
1. second
1. third
  1. first
  2. second
  3. third

All ones still renders 1, 2, 3. Handy when you reorder often, because you never renumber by hand.

Nested, and a paragraph inside an item
- parent
  - child
  - child
- another parent

1. step one

   A paragraph belonging to step one.

2. step two
  • parent
    • child
    • child
  • another parent
  1. step one

    A paragraph belonging to step one.

  2. step two

What usually goes wrong

  • Nesting needs two spaces for a bulleted list and three for a numbered one, because the indent has to line up past the marker. Get it wrong and the child becomes a sibling.
  • A blank line between items turns a tight list into a loose one, and every item gets wrapped in a paragraph with extra spacing. It is valid, just visibly different.
  • Starting a line with a number and a dot creates a list even when you meant a year: 1994. A good year becomes a numbered item. Escape it as 1994\.
  • A list needs a blank line before it if a paragraph comes directly above, or some renderers swallow it into the paragraph.

Related