Bug: Applying certain styles doesn't reset former styles

Operation system:
Windows 11 Version 23H2 (Build 22631.4890)

Web Browser:

Vivaldi 7.1.3570.54 (Stable channel) (64-Bit)
Überarbeitung de12898bf4b653e5121862729b799c0b8e52a655
Betriebssystem Windows 11 Version 23H2 (Build 22631.4890)
JavaScript V8 13.2.152.41
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Bug report

What were you doing:
Applying an header style in an unorderded list

What feature did you use:

Either shortcut CTRL+2 or “Heading 2” command from the style bar

What happened:
the styles added up, in the unordered list is now an H2-item with a bullet point before

What did you expect to happen:
applying an header style should reset certain other markup, e.g. lists


Feedback:
While I was writing this I tested the behaviour on iOS. There it is the same as on the web. Maybe this is intentional. I am not sure if having headings in list is or should be allowed.

Please have a look if this is intended. As it seems other Markdown editors don’t allow this behaviour and they don’t recognise # Heading1 with whitespaces before the #. If it’s not intended the logic for headings should be changed on all platforms.

This is intentional and consistent between the web, Mac, and iOS versions. We base our markdown on CommonMark, and there, you can have a heading inside a list item, but not the other way around.

On the other hand, it would be rather rare that someone wants a heading inside a list item, so I can certainly see that we could change this. But it wouldn’t be a priority.

Thanks for reporting!

1 Like

Fair enough, if it’s intentional and allowed in your chosen specs than it’s totally fine. Haven’t noticed it before though.