mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
comment clarity
This commit is contained in:
parent
7dcd3b24d8
commit
b49d025143
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ export function rollCommandToJSON(text) {
|
||||||
const flavor = flavorMatch ? flavorMatch[1] : null;
|
const flavor = flavorMatch ? flavorMatch[1] : null;
|
||||||
|
|
||||||
// Match key="quoted string" OR key=unquotedValue
|
// Match key="quoted string" OR key=unquotedValue
|
||||||
const PAIR_RE = /(\w+)\s*=\s*("(?:[^"\\]|\\.)*"|[^\]\}\s]+)/g; //updated regex to allow escaped quotes in quoted strings
|
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 = {};
|
const result = {};
|
||||||
for (const [, key, raw] of text.matchAll(PAIR_RE)) {
|
for (const [, key, raw] of text.matchAll(PAIR_RE)) {
|
||||||
let value;
|
let value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue