Skip to content

Commit

Permalink
[Goals] Allow decimal in percent templates (#2689)
Browse files Browse the repository at this point in the history
* allow decimal in percent templates

* release note
  • Loading branch information
shall0pass authored Apr 30, 2024
1 parent 4ed9f4f commit ad73a40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/loot-core/src/server/budget/goal-template.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ d 'digit' = [0-9]
number 'number' = $(d+)
positive = $([1-9][0-9]*)
amount 'amount' = currencySymbol? _? amount: $(d+ ('.' (d d?)?)?) { return +amount }
percent 'percentage' = percent: $(d+) _? '%' { return +percent }
percent 'percentage' = percent: $(d+ ('.' (d+)?)?) _? '%' { return +percent }
year 'year' = $(d d d d)
month 'month' = $(year '-' d d)
day 'day' = $(d d)
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2689.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [shall0pass]
---

Goals: Enable decimals for percentage templates.

0 comments on commit ad73a40

Please sign in to comment.