summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-03-24 17:23:50 -0400
committerCraig Earls <enderw88@gmail.com>2013-03-24 17:23:50 -0400
commit6a753e155eb8b4c1bb6dada200582d293985e0f2 (patch)
tree67b98face59e572d72442337c44d86f80f878c51
parent0d0e996e072072c2b203ff9eef2690d5f8c11c4f (diff)
downloadfork-ledger-6a753e155eb8b4c1bb6dada200582d293985e0f2.tar.gz
fork-ledger-6a753e155eb8b4c1bb6dada200582d293985e0f2.tar.bz2
fork-ledger-6a753e155eb8b4c1bb6dada200582d293985e0f2.zip
Fix ledger-split-commodities to handle integer balances
-rw-r--r--lisp/ldg-commodities.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ldg-commodities.el b/lisp/ldg-commodities.el
index 7dc0a900..e7014604 100644
--- a/lisp/ldg-commodities.el
+++ b/lisp/ldg-commodities.el
@@ -39,8 +39,8 @@
(insert str)
(goto-char (point-min))
(if (assoc "decimal-comma" ledger-environment-alist)
- (setq number-regex "-?[1-9][0-9.]*[,][0-9]*")
- (setq number-regex "-?[1-9][0-9,]*[.][0-9]*"))
+ (setq number-regex "-?[1-9][0-9.]*[,]?[0-9]*")
+ (setq number-regex "-?[1-9][0-9,]*[.]?[0-9]*"))
(cond ((re-search-forward number-regex nil t)
;; found a decimal number
(setq val