obsidian-dice-roller
obsidian-dice-roller copied to clipboard
🧩 Refactor lexical parser to accept front matter fields in dice contexts
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
- Make a two notes, one called "Note with metadata" and one called "Note with dice context"
- In "Note with metadata" add fields Stat_1 and "Stat 2"
- In "Note with dice context" add `dice: 1d20 + ({[[Note with metadata]].Stat_1} + {[[Note with Metadata]]["Stat 2"]})
- Verify that dice is rolled and adds the two stats to the roll