Two spaces nests a bullet, not a number

The same indent that works under a dash flattens a numbered list and renumbers it. Here is the rule that decides.

Markdown never counts indent levels

It compares your child's indent against one number: the column where the parent item's own text begins. Everything else follows from that.

The marker sets the floor

A dash plus its space is two columns wide, so a child nests at two. Write 1 dot space and the floor moves to three.

Under-indent and it renumbers

Two spaces under a numbered item makes the child a sibling. Ordered lists number by position, so your 1 is published as 2.

There is a ceiling too

Each marker gets a four-wide window. A dash nests at two through five spaces. Six is already too far.

Too far is text, not code

An indented code block cannot interrupt a paragraph, so the over-indented line joins the parent's text and the dash prints literally.

Item 10 breaks a working list

Items 1 to 9 need three spaces, item 10 needs four. Indent everything by three and only the bottom of the list collapses.

Four spaces per level, always

Four clears every common marker and stays under every ceiling. Verified in markdown-it, marked and micromark, four levels deep.

The whole rule, in one line

Indent to the parent's content column, and stop before four past it.

Read the full guide