"Editor > Smart lists" applies formatting even in code blocks

Steps to reproduce

  1. Enable “Editor > Smart lists”

  2. Create a code block with the following content:

    1. Placeholder
    
  3. Place cursor at the of the item in the code block and press enter

Did you follow the troubleshooting guide? [Y/N]

Yep

Expected result

A newline should be inserted like normal:

1. Placeholder
[placeholder text here]

Actual result

The editor treats it as a normal list despite being in a code block:

1. Placeholder
2. [placeholder text here]

Environment

SYSTEM INFO:
	Obsidian version: v1.8.10
	Installer version: v1.8.9
	Operating system: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:58 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8132 24.3.0
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 0
	Plugins enabled: 0

RECOMMENDATIONS:
	none

Additional information

Can confirm that the issue doesn’t exist when “Editor > Smart lists” is off.

1 Like

Continue here:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.