obsidian-dice-roller icon indicating copy to clipboard operation
obsidian-dice-roller copied to clipboard

🧩 Refactor lexical parser to accept front matter fields in dice contexts

Open Shyclops opened this issue 6 months ago • 0 comments

Scope

currently dice role context expects to only see numbers, change the parser so that it can take front matter fields as well

Discovery

Referencing number fields of a different note currently returns Error: Mismatched parenthesis. After the change

Validate

Steps

  1. Make a two notes, one called "Note with metadata" and one called "Note with dice context"
  2. In "Note with metadata" add fields Stat_1 and "Stat 2"
  3. In "Note with dice context" add `dice: 1d20 + ({[[Note with metadata]].Stat_1} + {[[Note with Metadata]]["Stat 2"]})
  4. Verify that dice is rolled and adds the two stats to the roll

Shyclops avatar Aug 08 '24 18:08 Shyclops