summaryrefslogtreecommitdiff
path: root/lisp/ledger-regex.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2015-09-18 06:51:18 -0700
committerCraig Earls <enderw88@gmail.com>2015-09-18 06:51:18 -0700
commit88ad616d18b69eb03bc14eaa9ce6b32be90867a6 (patch)
tree718c48954bc8580a8bd003984e45a1404a4c54d1 /lisp/ledger-regex.el
parent36de1868791cbb0fa36636494c68afcdb43e502b (diff)
parent92aead05ffba1966216e0cb40bf0ae192f001747 (diff)
downloadfork-ledger-88ad616d18b69eb03bc14eaa9ce6b32be90867a6.tar.gz
fork-ledger-88ad616d18b69eb03bc14eaa9ce6b32be90867a6.tar.bz2
fork-ledger-88ad616d18b69eb03bc14eaa9ce6b32be90867a6.zip
Merge pull request #429 from paulbdavis/fontify-recurring
Wow! Thank you. I didn't know anyone was using this feature besides myself.
Diffstat (limited to 'lisp/ledger-regex.el')
-rw-r--r--lisp/ledger-regex.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el
index 9d8394df..5d525d95 100644
--- a/lisp/ledger-regex.el
+++ b/lisp/ledger-regex.el
@@ -238,6 +238,22 @@
code
(note end-note))
+(ledger-define-regexp recurring-line
+ (macroexpand
+ `(rx (and line-start
+ (regexp "\\[.+/.+/.+\\]")
+ (? (and (+ blank) (regexp ,ledger-state-regexp)))
+ (? (and (+ blank) (regexp ,ledger-code-regexp)))
+ (+ blank) (+? nonl)
+ (? (regexp ,ledger-end-note-regexp))
+ line-end)))
+ "Match a transaction's first line (and optional notes)."
+ (actual-date full-date actual)
+ (effective-date full-date effective)
+ state
+ code
+ (note end-note))
+
(ledger-define-regexp account
(rx (group (and (not (any blank ?\[ ?\( ?: ?\;)) (*? nonl))))
"")