To keep prose after a Markdown code block from becoming code, remove its leading tab or four-space indent. If you also want a visible paragraph indent in Obsidian on your Mac, keep the Markdown unindented and apply that spacing with CSS.

Why does the paragraph become another code block?

Closing a fenced code block ends that block; it does not disable indentation syntax for the text below. At the top level, four or more leading spaces can start a separate indented code block. The following example therefore contains two code blocks, even though only the first has fences. CommonMark: Indented code blocks.

```text
Sample output
```

    This should be a normal paragraph.

The important distinction is whether the unwanted text belongs to the original fenced block or starts a new block. If the closing fence itself remains visible inside the code, check that it uses the opening fence’s character and contains at least as many backticks or tildes. For a top-level block, place both fences at the left margin to simplify inspection. GitHub Flavored Markdown: Fenced code blocks.

Adding blank lines cannot neutralize four-space indentation. Conversely, indented text immediately following an ordinary paragraph can remain part of that paragraph because an indented code block cannot interrupt it. That explains why apparently similar indentation sometimes behaves differently elsewhere in a note. CommonMark: Indented code blocks.

How do you restore an ordinary paragraph on a Mac?

In Obsidian, switch to Source mode so you can inspect the actual fences and leading whitespace. Use the editing-mode control in the status bar, or choose Settings → Editor → Default editing mode → Source mode. Obsidian documents this mode as displaying Markdown syntax exactly as written. Views and editing mode.

Find the first prose line after the closing fence. Delete its leading spaces or tab, leaving the text at the left margin. Repeat for any subsequent paragraph that has the same problem. Preserve indentation inside the intended code block.

Use this complete Markdown sample as a reference:

```text
Sample output
```

This is a normal paragraph with **bold text**.

This is another normal paragraph.

Keep the blank line after the closing fence for readable source. GitHub explicitly recommends blank lines around fenced code blocks, although the fence syntax itself does not require them. The four-backtick outer fences used to display examples in this article let the inner triple backticks remain visible. Creating and highlighting code blocks.

Switch to Reading view to inspect the result; on macOS, Cmd+E toggles between editing and reading. Check that the explanation uses normal paragraph formatting and that bold text appears bold. Live Preview hides much of the Markdown syntax and reveals it around the cursor, so use Source mode for diagnosis and Reading view for the final visual check. Views and editing mode.

Removing only two spaces from a four-space indent may prevent code parsing at the top level, but it does not establish a visible paragraph indent. Obsidian documents that adjacent ordinary spaces collapse in rendered text. A source indentation and a displayed indentation are different requirements. Basic formatting syntax.

How can you keep a visible paragraph indent in Obsidian?

For a first-line indent, use normal paragraphs plus a CSS snippet. This separates paragraph structure from presentation: the Markdown stays readable, while CSS supplies the visual spacing. Obsidian supports custom snippets and a cssclasses property for applying a style to selected notes. CSS snippets.

The following is an illustrative custom style, derived from Obsidian’s documented class mechanism and CSS paragraph indentation. It is not a built-in Obsidian formatting command. It targets rendered paragraph elements; check its appearance in Reading view.

Add the note property and stylesheet

Put this property block at the very beginning of the note. If the note already has a property block, add cssclasses there instead of creating a second block. Keep the prose after your code fence unindented.

---
cssclasses:
  - paragraph-indent
---

Create a plain-text file named paragraph-indent.css containing this complete stylesheet:

.paragraph-indent p {
  text-indent: 2em;
}

The p selector targets paragraphs within the custom note class. The text-indent property moves the first line inward; wrapped lines retain their normal starting position. The value 2em is an illustrative choice you can adjust. It does not insert spaces into the note. MDN: text-indent.

On your Mac, use a plain-text editor for the stylesheet. If using TextEdit, choose Format → Make Plain Text before saving. Confirm that the final filename is paragraph-indent.css, rather than a rich-text document or a file ending in .css.txt. Apple documents that converting to plain text removes document formatting and normally saves with a .txt extension. Create, open and convert documents in TextEdit on Mac.

  1. In Obsidian, open Settings → Appearance → CSS snippets.
  2. Select Open snippets folder and place paragraph-indent.css there.
  3. Select Reload snippets if the file is not listed.
  4. Enable the snippet’s toggle, then inspect the note in Reading view. CSS snippets.

This broad example indents every rendered paragraph matched within the selected note, including paragraphs inside other structures. It does not restrict the effect to the paragraph immediately after a code block. Disable the snippet or remove the note’s paragraph-indent class to undo the styling.

The stylesheet does not repair text that is still parsed as code: its selector targets paragraphs. Complete the whitespace correction first. Also, this paragraph selector is not a complete Live Preview editor style; do not expect identical editor and reading appearances.

What changes inside a list or on GitHub?

Indentation inside a list establishes membership in the list item. Do not remove it indiscriminately. In this complete example, the fence and explanation have three leading spaces, aligning them with the content after 1. . The explanation remains a paragraph within that item. GitHub Flavored Markdown: List items.

1. Review the sample.

   ```text
   Sample output
   ```

   This explanation belongs to the same list item.

For other list markers, calculate the continuation indent from the marker and its following spacing. A fixed instruction to remove all indentation would break the intended structure. If the explanation should be outside the list, return it to the left margin instead. GitHub Flavored Markdown: List items.

Obsidian documents support for CommonMark and GitHub Flavored Markdown alongside its own extensions. That does not make an Obsidian CSS snippet portable Markdown formatting: the snippet is configured separately in Obsidian. Check the actual destination renderer when moving a note. Obsidian also documents that Markdown inside HTML elements is not processed, so an HTML wrapper changes the formatting conditions rather than providing a universal solution. Obsidian Flavored Markdown.

Which fix should you choose?

Use the smallest change that meets your intended result:

  • Ordinary prose after code: remove the paragraph’s leading tab or four-space indent.
  • A paragraph within a list item: retain the indentation needed for that item’s content.
  • A visible first-line indent in Obsidian: use unindented prose with the scoped CSS example.
  • A document viewed in several apps: preserve clear Markdown structure and verify presentation separately in each destination.

When checking the finished note, ask two questions: does the text parse as a paragraph, and does that paragraph have the spacing you want? Correct the Markdown structure first. Then apply visual indentation where the renderer supports it, keeping the stylesheet separate from the prose.

Sources