Tabs outside of lists render with the wrong width

Once you’ve done the above, delete everything above this line.

Steps to reproduce

Two different ways:

Indent a line with multiple tabs.
Indent an item in a list so it has two or more extra levels of indentation compared with the previous line.

Expected result

The tab sizes and indentation should match the “Tab indent size” setting, so they line up with indentation in lists.

Actual result

The width of the tabs shrinks, and they don’t align properly. They don’t follow the “Tab indent size” setting.

Environment

  • Operating system: Windows 11 Pro
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v1.1.9
    Installer version: v1.1.9
    Operating system: Windows 10 Pro 10.0.22621
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Screenshot showing the problem:

image

This markdown reproduces it:

Untitled 9.md (62 Bytes)

This screenshot, done with spaces, is what I would expect:

image

1 Like

Indenting a line that’s not in a list marks it as a code block — note that unlike the rest of the text, it’s in a monospace font. (That doesn’t necessarily disqualify this as a bug, but FYI.)

Additionally, in the first screenshot you can see that there’s a code block at the top showing the too-small tab width. The “four tabs” line at the bottom is not a code block, and it has the same problem. It doesn’t seem to be directly related to code blocks.

Here’s another screenshot with a code block that also shows another problem: the indentation markers of the different “five tabs” lines are misaligned with each other. The one under the list looks like it starts centred with the first bullet point, the one outside of the list looks like it starts right at the left margin.

image