Bug with formatting inside code blocks

Steps to reproduce

  1. Create a new file.
  2. Start writing the following:
1. foo
3. bar

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

Yes

Expected result

1. foo
3. bar

Actual result

1. foo
   2. bar

Environment

Was able to reproduce in 3 different vaults across 2 different machines, this is for one of them:

SYSTEM INFO:
Obsidian version: v1.10.6
Installer version: v1.8.10
Operating system: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 24.6.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: on
RECOMMENDATIONS:
none


Additional information

There is a big chance other markdown-related autoformatting will also be triggered inside code blocks, while those should stay strictly raw without any processing.

Ok, first time using discourse in a long time, by “the following” I meant a code block with text inside:

```
1. foo
3. bar
```

Which then gets autoformatted inside the code block (obviously, autoformatting outside of it is fine)

Continue here: