Skip to content

🐞 The List Roller ignores the first two items in a list after a vault is reopened #371

Open
@yarrow

Description

@yarrow

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

Given a note titled Test with the contents below, Dice Roller should pick one of the four items at random.

## Four Items

`dice: [[Test#^four-items]]`

1. First
2. Second
3. Third
4. Fourth

^four-items

Current behaviour

When the Test note described above is in a vault, and the vault is closed and reopened, Dice Roller doesn't see the first two list items. See the screenshot below, where the tooltip shows that Dice Roller believes that Third is the first of two items, not the third of four items. (If any item is edited, Dice Roller will see the first two items — but only until the vault is closed and reopened again.) I see the same thing on iOS: There is no tooltip, but tapping the random selection only switches between Third and Fourth, never yielding First or Second.

Image

Reproduction

  1. Launch Obsidian Sandbox via the Open Sandbox Vault command. (An alternative to using the Sandbox would be to create a new vault.)
  2. Install Dice Roller
  3. Create a new note called test, with the contents below. (Dice Roller will see all four items.)
  4. Close the Sandbox
  5. Reopen the Sandbox in a way that does not destroy changes — on my Mac that's by File → Open Recent or the vault popup menu in the lower left corner:
    Image
  6. At this point Dice Roller sees only items Third and Fourth and thinks they are the first and second items of a two-item list.

Here is the Markdown for the Test note:

## Four Items

`dice: [[Test#^four-items]]`

1. First
2. Second
3. Third
4. Fourth

^four-items

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

Obsidian Version 1.8.9 (Installer 1.6.7)

Plugin Version

11.4.1

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

  • I don't see this behavior with tables, only with lists.
  • I wonder if it's a caching issue, given the fact that Dice Roller is fine when the list is newly edited (or newly created), but can't see the first two items when the vault is closed and reopened.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions