Creating a new bullet point in a list item with checkboxes clears all lower checkboxes and resets numbering

Steps to reproduce

Create a list with a layout like this:

1. [ ] Checkbox item 1
  - Sub item
2. [ ] Checkbox item 2
3. [ ] Checkbox item 3

Place your cursor at the end of the “Sub item” line and press Enter. The result is the following:

1. [ ] Checkbox item 1
  - Sub item
  - 
1. Checkbox item 2
2. Checkbox item 3

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

Expected result

Expected result in the above scenario would be to not alter the rest of the list when creating a new sub item:

1. [ ] Checkbox item 1
  - Sub item
  - 
2. [ ] Checkbox item 2
3. [ ] Checkbox item 3

Actual result

(detailed above)

Environment

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.16
	Operating system: Windows 10 Enterprise 10.0.22621
	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: on

RECOMMENDATIONS:
	none

Additional information

Fortunately, there is a workaround where you can press “Ctrl+Z” immediately after the list is altered (after pressing “Enter” to create the new sub item) and this will undo the changes to the following items in the list.

I see what you mean, and it happens for me too. Even just on numbered lists:

1. List item 1
  - Sub item
2. List item 2
3. List item 3

On a tangent, I can’t find any reference to numbered task lists in Commonmark or Obsidian Help.

Where are you getting that syntax, or are you just trying it, freestyle? I’m not sure it’s supported, and perhaps it’s possible that it’s just a coincidence that the parser is showing it as a numbered task list in the first place.

(But the issue does still happen on regular lists. So I do think something is wrong. Unless nesting a plain bullet under a numbered bullet isn’t supported.)

I’m just typing these freehand. Someone had a list of things they needed from me (already numbered) and I added the checkboxes.

Obsidian renders the markdown just fine so there isn’t any reason to say it’s “unsupported”. Maybe “strange” but still valid. The issue definitely is related to the base issue of numbering restarting when an additional sub item is created.

The example here is different, but these two topics seem related:

https://forum.obsidian.md/t/press-enter-into-an-ordered-list-with-checkbox-will-remove-the-latter-lines-checkbox/60619/4

https://forum.obsidian.md/t/numbered-lists-do-not-render-under-checkboxes/69825/2

Could be by adding a hyphen (a bullet) within an ordered list, the list type is changing and “breaking” the list. (screenshots from Reading view)

A “regular” ordered list:

Still odd behavior though.

The reasons that syntax isn’t valid or supported are:

  • It’s not documented in Obsdian’s Help.
  • Obsidian gets its task list syntax from GitHub-Flavored Markdown, which does not have numbered task lists.

It only happens to work by accident, it’s not an intentional feature. You’re free to use it anyway if you like, but it may stop working in the future and it’s unlikely to work in other apps.

Anyway, the problem you found is a quirk of Live Preview. If you switch to Reading View (which typically renders more correctly because that’s its only job) you’ll see the correct numbering. …Or not. I don’t know what I did differently, but on retesting l see the behavior.

1 Like

screenshot_2024-02-02_10-10-54

That’s not the case for me. Once the list has been renumbered, it is destructively renumbered in Reading View too. BUT that seems to be because derekantrican is using 2 spaces for indentation. And that isn’t numbering properly for me, even if I set my indentation settings to 2. If I set it to 4, and fix the indentation to 4 spaces, then it works.

If I set it to 4, I also do NOT get the renumbering glitch on numbered sublists, but I do get it on mixed-bullet sublists.

screenshot_2024-02-02_10-19-04

screenshot_2024-02-02_10-20-42

So I agree, you’re likely hitting on some things which are not actually supported. But the incorrect indentation when you are set to 2 spaces seems wrong, and I seem to recall an existing bug report about this somewhere.

OK, weird — now I’m seeing that too. I’m pretty sure I copied the example from the original post last time, but I must have done something different somewhere.

was fixed 1.5.4

2 Likes

Wow, that was fast! Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.