summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-04-24 06:51:58 -0700
committerCraig Earls <enderw88@gmail.com>2014-04-24 06:51:58 -0700
commit62bdb2f13a31449ca6f439ee121162647c39855e (patch)
treeb9b63caf6ac7e318a96f338c5bc086ba8cf6f38f
parentd752bef547fb696cd1c9151c1c3d00e9a945eadd (diff)
parente2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e (diff)
downloadfork-ledger-62bdb2f13a31449ca6f439ee121162647c39855e.tar.gz
fork-ledger-62bdb2f13a31449ca6f439ee121162647c39855e.tar.bz2
fork-ledger-62bdb2f13a31449ca6f439ee121162647c39855e.zip
Merge pull request #280 from csrhodes/fix-ledger-iterate-regex
Fix ledger iterate regex
-rw-r--r--lisp/ledger-regex.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el
index 8d838892..91344523 100644
--- a/lisp/ledger-regex.el
+++ b/lisp/ledger-regex.el
@@ -178,8 +178,8 @@
(ledger-define-regexp iso-date
( let ((sep '(or ?- ?/)))
(rx (group
- (and (group (? (= 4 num)))
- (eval sep)
+ (and (? (and (group (= 4 num)))
+ (eval sep))
(group (and num (? num)))
(eval sep)
(group (and num (? num)))))))
@@ -325,7 +325,7 @@
(note end-note))
(defconst ledger-iterate-regex
- (concat "\\(Y\\s-+\\([0-9]+\\)\\|" ;; Catches a Y directive
+ (concat "\\(\\(?:Y\\|year\\)\\s-+\\([0-9]+\\)\\|" ;; Catches a Y/year directive
ledger-iso-date-regexp
"\\([ *!]+\\)" ;; mark
"\\((.*)\\)?" ;; code