Bullet rendering causes unwanted pre-formatted text rendering

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

Steps to reproduce

  1. start a new note
  2. open the attached “bug.md” file in a text editor
  3. select all and copy the text
  4. paste it into your new note
  5. observer the incorrect rendering
    a. the last bullet is not rendered as a bullet (has a dash)
    b. text for the last bullet is show preformatted / monospace
    attached “bug.md” file renders incorrectly as shown in the screenshot

    bug.md (218 Bytes)

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

Yes, same behavior in sandbox vault

Expected results

the last bullet (“this breaks and for some reason is in preformatted”) should be rendered with a bullet (not a dash)
the last bullet (“this breaks and for some reason is in preformatted”) should not be rendered as monospace

Actual result

(see screenshot)

Environment

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.4.14
Operating system: Darwin Kernel Version 22.4.0: Mon Mar 6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 22.4.0
Login status: logged in
Catalyst license: none
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

  • this problem happens on my OSX Obisidian shown above AND my iOS mobile app

Apologies, wrong screenshot showing the bug. The even-worse screenshot happens sometimes if I have the bug and a copy of it in 2 windows at the same time, but am working on a repro.

You can’t arbitrarily indent in Markdown (your last line); it will create a code block. This is an exact copy-paste of the contents of bug.md here in the forum (which also uses Markdown) →

  • this is a bullet
    • this is a sub bullet

this is some text

  • this works ok

  • Now let’s try again…this is a bullet

    • this is a sub bullet

this is some text

- this breaks and for some reason is in preformatted

Here’s another example using checkboxes:


Markdown Resources

1 Like

I desperately need something to fix this.

I love having a title, and then the first paragraph to be indented inside that title. Obsidian it’s getting in my way while trying to do that, it’s really bad for writing. Maybe it works for code, but I really can’t care less to have code when pressing tab, i prefer to have it using ```.

Been searching all day, reading posts from years ago, and still no solution. I’m sad lol

If you remove two of the spaces in front of the “this breaks” line, you’ll get the indentation correct for that line. If you don’t it’ll be interpreted as a code block.

If you on the other hand need the second “this is some text” at the sub bullet level, you’ll need to do something like:

this is some text (at outer indentation)

- this works ok
- Now let's try again... this is a bullet
  - This is a sub bullet  
    
    This is text at the sub bullet level

  - This is a continuation of the sub bullet list...

Which when inserted here in the forum creates:


  • this works ok
  • Now let’s try again… this is a bullet
    • This is a sub bullet

      This is text at the sub bullet level

    • This is a continuation of the sub bullet list…


And in Obsidian is rendered like:
image

Note that I don’t have different sub-level markers in my theme.

At first i got happy because it kind of worked, but then I wanted to add another line at the first two spaces level and it got like that.

Can’t we just f-ing disable code blocks in all obsidian?

I really can’t believe how they didn’t address it. Been reading forum posts and reddit posts about this since years

There are indeed numerous posts related to this. The general consensus is that markdown isn’t really made to make indentation, outside of those given by list indents and/or block quotes. Whenever you start trying to do pure text indentations outside of lists, you’re on your own.

And you do need to make sure you’re using the exact same amount of spaces in front of your text, or else it breaks again. It seems like your image uses a different amount of space character in front of the line, and hence it fails. But you failed to provide us with a pure text copy, so we can’t tell for sure, or guide you any more than that.