---
title: "Markdown nested lists and block quotes: indent rules"
slug: markdown-block-quotes-nested-lists
excerpt: "How to nest a Markdown list, how far to indent a sub-list, and how to write block quotes, nested quotes and code inside a list item."
quickAnswer: "To nest a Markdown list, count the parent item's marker and the space after it, then indent the child line by that many spaces. A dash bullet gives 2, and a numbered item such as 1 with a period gives 3. This count works for a normal item that starts with text. The same indent holds a second paragraph, a quote or a code block inside the item. A block quote is a line that starts with >, and > > puts a quote inside a quote. Put an empty line between two separate quotes, or they join into one."
keyTakeaways:
  - In a normal item that starts with text, a new block inside it needs at least as much indent as that text.
  - Count the marker and the space after it. A dash and a space make 2 characters, and 1 with a period and a space make 3.
  - Put > at the start of every quote line, blank lines included, and use > > for a quote within a quote.
  - A list turns loose when items are split by a blank line, or when one item holds two blocks with a blank line between them.
  - Sashmark's v1 plan includes rendering lists and block quotes as you read.
publishedDate: 2026-10-20
dateModified: 2026-10-20
author: Bobby Huang
cluster: B
role: post
status: published
faq:
  - q: Why does my nested list render flat?
    a: The child lines may not be indented far enough. For a normal item that starts with text, count the characters before that text, including the marker and the space after it. Indent each child by that many spaces. An easy miss is two spaces under a numbered item such as 1, since it needs three.
  - q: Can a list item have a second paragraph?
    a: Yes. Skip a line after the first paragraph, then start the second one indented at least to the column where the item's text begins. If the indent is short, the paragraph drops out of the list and the list ends.
  - q: How do I stop two block quotes from merging?
    a: Put an empty line with no > on it between them. Each run of > lines then renders as its own quote.
related:
  - markdown-syntax-guide
  - markdown-task-lists
  - write-markdown-docs-your-ai-agent-can-follow
  - markdown-cheat-sheet
---

Put `- Bump the version` two spaces in under `1. Prepare the release`, and it falls out of step 1. Put it three spaces in, and it nests. That is the nesting rule from the [Markdown syntax guide](markdown-syntax-guide.md), and the same count decides where quotes, code and extra paragraphs go inside an item.

AI agents can write nested steps and quoted notes, so those few spaces matter in their files. Each rule below is checked against the CommonMark spec, and the text flags the spots where tools differ.

## Block quotes

The `>` character marks a block quote. A space after it is optional. Give every line of the quote its own marker.

```markdown
> Build passed on the second try.
> The first run timed out on the network step.
```

This parses as one quote holding a single paragraph with both sentences. The line break between them is a soft break, and many viewers show a soft break as a space.

To split the quote into two paragraphs, add a line that holds only `>`:

```markdown
> Build passed on the second try.
>
> The first run timed out on the network step.
```

### A quote inside a quote

Two markers at the front of a line put a quote inside a quote. The spec accepts `>>` too, but the spaced form is easier to read.

```markdown
> Jane Doe asked for a status check.
>
> > Is the export job still failing?
```

Viewers draw the inner quote in different ways. An agent may use this shape to quote a question and then answer it.

### Two quotes in a row

Lines that start with `>` stick together. If you want two separate quotes, put a fully empty line between them.

```markdown
> First note from the review.

> Second note, kept apart.
```

Without that empty line, the two notes merge into a single quote.

### The lazy-line rule

The spec lets a quote paragraph carry on to a line with no `>` at the start. That line still counts as part of the quote. So this parses as one quote with three sentences in one paragraph:

```markdown
> The migration ran.
It touched 40 tables.
> No errors came back.
```

This only works for plain paragraph text. A line that starts a list, a code fence or a `---` rule will not be pulled in. To be safe, put `>` on every line of the quote, blank lines too.

## List markers

Bullet items start with `-`, `+` or `*`. Numbered items start with up to nine digits, then `.` or `)`. An item with text needs a space or tab between the marker and the text. Without the space, `-step` and `3.step` are just text.

## How far to indent a sub-list

Every list item has a content column. For a normal item that starts with text, it is the spot where that text starts. Count the marker, then the spaces after it. An item that opens with indented code counts its column another way, which this page leaves aside.

- `- Item` puts the text at column 2, so child lines get 2 spaces.
- `1. Item` puts the text at column 3, so child lines get 3 spaces.
- `10. Item` puts the text at column 4, so child lines get 4 spaces.

A new block inside the item, such as a sub-list, a second paragraph, a quote or a code block, has to start at that column or further in. Two exceptions exist. A lazy line that just carries on the item's paragraph text may have less indent. An indented code block inside an item needs four more spaces past the content column.

```markdown
1. Prepare the release
   - Bump the version
   - Update the changelog
2. Tag the commit
```

Here the bullets sit under step 1 because they start at column 3, right under the P in "Prepare". At 2 spaces they drop out of step 1 and become a separate bullet list between the numbered steps. Nested check boxes follow the same indent rule, as the page on [Markdown task lists](markdown-task-lists.md) shows.

## Other blocks inside a list item

A list item can hold any block. The content column rule still applies.

### A second paragraph

After a blank line, indent the new paragraph to the content column.

```markdown
- Rotate the API key.

  The old key stops working after one hour.
- Restart the worker.
```

The second sentence parses as its own paragraph inside the first bullet.

### A quote

```markdown
1. Read the error from the last run.

   > Timeout after 30 seconds on step 4.
2. Raise the timeout.
```

The quote is part of step 1, since its `>` starts at column 3, the same column as the step's text.

### A code block

The opening fence, the code and the closing fence all move in to the content column.

````markdown
1. Install the packages.

   ```bash
   npm install
   ```
2. Start the server.
````

The command parses as a code block that belongs to step 1, and step 2 stays in the same list. If the fence starts at column 0, the code block ends the list. Step 2 then starts a new list of its own.

## Tight and loose lists

The spec gives two ways for a list to become loose. One is a blank line between any two of its items. The other is an item that directly holds two blocks, such as two paragraphs, with a blank line between them. In a loose list, the paragraphs inside items get paragraph tags in HTML, and many viewers add space around them. A list with neither is tight, and many viewers show a tight list with less space between items. The words do not change, but in many viewers the list spreads out on the page.

One stray blank line between items in a long agent list makes the whole list loose, so delete it if the list should be tight. Each list is judged on its own. A blank line inside a nested list, a quote or a code block does not loosen the outer list, and an inner list can stay tight while its outer list is loose.

## Numbered lists that interrupt a paragraph

You can start a list on the very next line after a paragraph, with no blank line. That shortcut is open to a numbered list only when its first number is 1.

```markdown
Steps left:
3. Run the tests
4. Merge the branch
```

Because the first number here is 3, the parser reads these lines as more of the paragraph. Add a blank line after "Steps left:" and they become a list that starts at 3.

## Fix a nested list an agent wrote that renders flat

When an agent's plan shows every step at the same level, the nesting may be off by a space or two. Work through it like this:

1. Open the file as raw text in a plain editor, so you see the real spaces.
2. Find the parent item. For an item that starts with text, count the marker and the spaces after it to get its content column.
3. Check each child line. Its marker should start at that column.
4. If the file uses tabs, swap them for spaces. Counting is much easier that way.
5. For items with text, check for a space or tab after the marker.
6. Look for a numbered sub-list that starts above 1 right after a line of text. Separate it from that text with an empty line.
7. Look for blank lines you did not mean to add. Remove them if the list should be tight.
8. Compare the nesting you meant with the nesting on screen, one parent at a time.

## Where Sashmark fits

Sashmark, still being built, is meant for people who open agent-written Markdown to read it and fix it. It is in development and has not been released. The app itself has no AI features. Lists, check-box lists and block quotes are among the parts planned for v1. See the [planned features](/features), the [help pages](/help) and the [roadmap](/roadmap) for where each part stands.

You can see what Sashmark is and follow along at [sashmark.com](https://www.sashmark.com/).
