summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-10-26 15:42:18 -0700
committerJohn Wiegley <johnw@newartisans.com>2015-10-26 15:42:18 -0700
commit2959d06adc38edb1620fc67f4c7433dc4f493c89 (patch)
treee61a526322569951001a6c7586f6923bb42a73dc /lisp
parent661a4cb57a8ec0a19bac2c8655fcc86c9b93a650 (diff)
parent2002900645cf828b4d7303bfe79113ce3d03ca58 (diff)
downloadfork-ledger-2959d06adc38edb1620fc67f4c7433dc4f493c89.tar.gz
fork-ledger-2959d06adc38edb1620fc67f4c7433dc4f493c89.tar.bz2
fork-ledger-2959d06adc38edb1620fc67f4c7433dc4f493c89.zip
Merge pull request #436 from Fuco1/fix-context-amount-regexp
Fix amount regexp in context computation.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-context.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ledger-context.el b/lisp/ledger-context.el
index 643ebdd3..629d51a5 100644
--- a/lisp/ledger-context.el
+++ b/lisp/ledger-context.el
@@ -34,8 +34,8 @@
(defconst ledger-indent-string "\\(^[ \t]+\\)")
(defconst ledger-status-string "\\(* \\|! \\)?")
(defconst ledger-account-string "[\\[(]?\\(.*?\\)[])]?")
-(defconst ledger-separator-string "\\s-\\s-+")
-(defconst ledger-amount-string "\\(-?[0-9]+[\\.,][0-9]*\\)")
+(defconst ledger-separator-string "\\(\\s-\\s-+\\)")
+(defconst ledger-amount-string "\\(-?[0-9]+\\(?:[\\.,][0-9]*\\)?\\)")
(defconst ledger-comment-string "[ \t]*;[ \t]*\\(.*?\\)")
(defconst ledger-nil-string "\\([ \t]\\)")
(defconst ledger-commodity-string "\\(.+?\\)")