[Fix] Enricher fixes for [[fr]] and reaction argument lazy fix (#1586)

* Update utils.mjs

* fixed reaction situation.

* Made change in enricher instead of dialog

* comment clarity
This commit is contained in:
Nikhil Nagarajan 2026-01-27 11:56:42 -05:00 committed by GitHub
parent bae9470a4f
commit 6321c7c508
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -90,11 +90,12 @@ export const enrichedDualityRoll = async (
event: event ?? {},
title: title,
headerTitle: label,
actionType: reaction ? 'reaction' : null,
roll: {
trait: traitValue && target ? traitValue : null,
difficulty: difficulty,
advantage,
type: reaction ? 'reaction' : null
// type: reaction ? 'reaction' : null //not needed really but keeping it for troubleshooting
},
skips: {
resources: !grantResources,

View file

@ -12,7 +12,7 @@ export function rollCommandToJSON(text) {
const flavor = flavorMatch ? flavorMatch[1] : null;
// Match key="quoted string" OR key=unquotedValue
const PAIR_RE = /(\w+)=("(?:[^"\\]|\\.)*"|\S+)/g;
const PAIR_RE = /(\w+)\s*=\s*("(?:[^"\\]|\\.)*"|[^\]\}\s]+)/g; //updated regex to allow escaped quotes in quoted strings and avoid matching closing brackets/braces
const result = {};
for (const [, key, raw] of text.matchAll(PAIR_RE)) {
let value;