Ordered lists auto-renumbered when pasting despite intervening content

Steps to reproduce

  1. Open Obsidian in Restricted mode (Settings → Community plugins → Turn on Restricted mode).
  2. Disable Settings → Editor → Smart indent lists.
  3. Copy this exact text:
    ## Stage One
    1. Abc
    2. aBc
    3. abC
    
    ## Stage Two
    There is text between the lists.
    The lists are logically independent.
    
    1. Xyz
    2. xYz
    3. xyZ
    
  4. Paste into Obsidian using Ctrl/Cmd+Shift+V (plain text paste).

Note: Steps 1 (Restricted mode), 2 (disabling Smart indent lists), and 4 (plain-text paste) are not inherently required to trigger the issue. They are included to conclusively demonstrate that this behavior:

  • Might originate from core editor logic
  • Is unrelated to plugins/paste formats

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

Y

  • Reproduced in sandbox vault (new vault created via restricted mode)
  • Default theme, no CSS snippets, no plugins
  • Tested on both Windows and macOS versions

Expected result

Source code should preserve original numbering:

## Stage One
1. Abc
2. aBc
3. abC

## Stage Two
There is text between the lists.
The lists are logically independent.

1. Xyz  <!-- Should remain 1. -->
2. xYz
3. xyZ

Actual result

Obsidian modifies the source code:

## Stage One
1. Abc
2. aBc
3. abC

## Stage Two
There is text between the lists.
The lists are logically independent.

4. Xyz  <!-- Source code is altered to 4. -->
5. xYz
6. xyZ

Environment

Obsidian Version: v1.8.4
Installer version: v1.7.4
Operating system: Windows 10 Pro 23H2 (also reproduced on macOS Sequoia)

Additional information

Key Issue Clarification

This is not a rendering issue - Obsidian physically modifies the pasted source code text.

Workaround impact

Users must manually edit numbering or insert <!-- --> comments to block auto-formatting, which disrupts workflow.

Duplicate of