mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
[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:
parent
bae9470a4f
commit
6321c7c508
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue