diff --git a/packages/loot-core/src/server/budget/goal-template.pegjs b/packages/loot-core/src/server/budget/goal-template.pegjs index 2efb87f5443c662a23f69767ebc0d476a9704627..28ce8741c0a6187b48c091c6ab63ca358034057b 100644 --- a/packages/loot-core/src/server/budget/goal-template.pegjs +++ b/packages/loot-core/src/server/budget/goal-template.pegjs @@ -1,9 +1,11 @@ +// https://peggyjs.org + expr - = priority: priority? percent: percent _ of _ category: name + = priority: priority? _? percent: percent _ of _ category: name { return { type: 'percentage', percent: +percent, category, priority: +priority }} - / priority: priority? amount: amount _ repeatEvery _ weeks: weekCount _ starting _ starting: date limit: limit? + / priority: priority? _? amount: amount _ repeatEvery _ weeks: weekCount _ starting _ starting: date limit: limit? { return { type: 'week', amount, weeks, starting, limit, priority: +priority }} - / priority: priority? amount: amount _ by _ month: month from: spendFrom? repeat: (_ repeatEvery _ repeat)? + / priority: priority? _? amount: amount _ by _ month: month from: spendFrom? repeat: (_ repeatEvery _ repeat)? { return { type: from ? 'spend' : 'by', amount, @@ -12,11 +14,11 @@ expr from, priority: +priority } } - / priority: priority? monthly: amount limit: limit? + / priority: priority? _? monthly: amount limit: limit? { return { type: 'simple', monthly, limit, priority: +priority } } - / priority: priority? limit: limit + / priority: priority? _? limit: limit { return { type: 'simple', limit , priority: +priority } } - / priority: priority? schedule _ full:full? name: name + / priority: priority? _? schedule _ full:full? name: name { return { type: 'schedule', name, priority: +priority, full } } diff --git a/upcoming-release-notes/1059.md b/upcoming-release-notes/1059.md new file mode 100644 index 0000000000000000000000000000000000000000..70cc325c902d5431d1ed22849281df1cd78fa649 --- /dev/null +++ b/upcoming-release-notes/1059.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [youngcw] +--- + +Goals: Undo change that broke some template parsing