summaryrefslogtreecommitdiff
path: root/lisp/ledger-regex.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-12-01 19:30:10 -0700
committerCraig Earls <enderw88@gmail.com>2014-12-01 19:30:10 -0700
commit07324cb6b235cf2cbea6045575c1f3b095cc6123 (patch)
treee1d6cc9d6789de46ccbcd899a1776adbed0fd48d /lisp/ledger-regex.el
parenta953fe6cbcd7ad7700137a382eacc3ed2e6c9abf (diff)
downloadfork-ledger-07324cb6b235cf2cbea6045575c1f3b095cc6123.tar.gz
fork-ledger-07324cb6b235cf2cbea6045575c1f3b095cc6123.tar.bz2
fork-ledger-07324cb6b235cf2cbea6045575c1f3b095cc6123.zip
Simplifies parsing of the beginning of an act. This allows fontifying effective dates.
Diffstat (limited to 'lisp/ledger-regex.el')
-rw-r--r--lisp/ledger-regex.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el
index b13647b5..91c715a3 100644
--- a/lisp/ledger-regex.el
+++ b/lisp/ledger-regex.el
@@ -334,11 +334,14 @@
(defconst ledger-xact-start-regex
(concat "^" ledger-iso-date-regexp ;; subexp 1
- ;; "\\(=" ledger-iso-date-regexp "\\)?"
- " ?\\([ *!]\\)" ;; mark, subexp 5
- " ?\\((.*)\\)?" ;; code, subexp 6
- " ?\\([^;\n]+\\)" ;; desc, subexp 7
- "\\(\n\\|;.*\\)" ;; comment, subexp 8
+ "\\(=" ledger-iso-date-regexp "\\)?"
+ ))
+
+(defconst ledger-xact-after-date-regex
+ (concat " ?\\([ *!]\\)" ;; mark, subexp 1
+ " ?\\((.*)\\)?" ;; code, subexp 2
+ " ?\\([^;\n]+\\)" ;; desc, subexp 3
+ "\\(\n\\|;.*\\)" ;; comment, subexp 4
))
(defconst ledger-posting-regex