From 6a753e155eb8b4c1bb6dada200582d293985e0f2 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Sun, 24 Mar 2013 17:23:50 -0400 Subject: Fix ledger-split-commodities to handle integer balances --- lisp/ldg-commodities.el | 4 ++-- 1 file 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 -- cgit v1.2.3