javalent / fantasy-statblocks

Create Dungeons and Dragons style statblocks for Obsidian.md
MIT License
346 stars 72 forks source link

🐞 Extra characters added to "to hit" value before dice roller #292

Closed pditterline closed 10 months ago

pditterline commented 10 months ago

Check for existing bug reports before submitting.

Expected Behavior

Parentheses in the to-hit parsing for an action before the dice roller token should only contain the +/- <value> string and no extra characters.

Current behaviour

A couple characters (":" normally, but omitting the colon will result in other characters getting added) before the to-hit bonus are getting added to the portion in parentheses after the dice roller. The example markup provided in the readme renders like this:

  - name: Bite
    desc: "Melee Weapon Attack: +15 to hit, reach 15 ft., one target. Hit: 19 (2d10 + 8) piercing damage plus 9 (2d8) acid damage."

image

Reproduction

Parse a 5e statblock with the normal melee attack text (the Black Dragon example from the readme will replicate the issue).

Simple example:

```statblock
name: Extra Colon
size: Small
actions:
  - name: Bite
    desc: "Melee Weapon Attack: +15 to hit, reach 15 ft., one target. Hit: 19 (2d10 + 8) piercing damage plus 9 (2d8) acid damage."


### Which Operating Systems are you using?

- [ ] Android
- [ ] iPhone/iPad
- [ ] Linux
- [ ] macOS
- [X] Windows

### Obsidian Version Check

1.4.16 and 1.4.13

### Plugin Version

3.15.2

### Confirmation

- [X] I have disabled all other plugins and the issue still persists.

### Possible solution

Possibly related to the recent fix for #135 ?
valentine195 commented 10 months ago

This should be fixed in v3.15.8