branch: elpa/csv2ledger commit f299813350ff94cf89d7600ec9aaf7b9fe6ec2cc Author: Joost Kremers <joostkrem...@fastmail.com> Commit: Joost Kremers <joostkrem...@fastmail.com>
Recognise amounts without cents in c2l--amount-p --- csv2ledger.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csv2ledger.el b/csv2ledger.el index eb06558c62..0999355a95 100644 --- a/csv2ledger.el +++ b/csv2ledger.el @@ -347,7 +347,7 @@ Return the modified transaction." (defun c2l--amount-p (str) "Return non-nil is STR is likely to be an amount." - (if (string-match-p "[0-9]+[0-9.,]*[.,][0-9]\\{2\\}" str) + (if (string-match-p "[0-9]+[0-9.,]*\\(?:[.,][0-9]\\{2\\}\\)?" str) str)) (defun c2l-compose-entry (transaction)