ironmonk88 / monks-tokenbar

GNU General Public License v3.0
48 stars 46 forks source link

[BUG] Brief description of your issue #470

Open Drazev opened 9 months ago

Drazev commented 9 months ago

Describe the bug A clear and concise description of what the bug is. The Request Roll inline syntax creates an exception when you attempt to make a roll request for any skill that includes a space in the name. One example is Animal Handling for DND5e. Debugging shows that it will only parse out the first token "Animal" and attempt to find a matching skill, which creates an error.

Text used

To Reproduce Steps to reproduce the behavior:

  1. In a monks journal entry, click 'Request Roll Config' to create an Animal Handling check OR enter in token string @Request[Animal Handling dc:15 silent rollmode:selfroll]{You attempt to calm the animal down to prevent it from harming itself.}
  2. Save the journal entry.
  3. Click on the resultant request roll hypertext.
  4. See error in console

Expected behavior A roll request should be made with the requested skill

Screenshots

Screenshot 2024-02-20 135129 Screenshot 2024-02-20 135611 image

**Please comp

lete as much of the following information as possible:**

Additional context

Drazev commented 9 months ago

I don't know your code base well. Though I followed the entire event chain and noticed it was only ever sent "Animal". Also when you mouse over the hypertext in the journal entry it says "Animal DC:15" as well. So the problem likely lies where you created the clickable field after saving into the journal.