diff options
author | Craig Earls <enderw88@gmail.com> | 2014-09-08 20:42:01 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-09-08 20:42:01 -0700 |
commit | 64c541a3d80eca52e1793acb2429247ec2566157 (patch) | |
tree | 01129a5c53140f858dcbe35f47161c44080ebbc2 /lisp/ledger-regex.el | |
parent | db09e0d2e6e32e14251f30dc33bb02e4bdd0fd1b (diff) | |
parent | ad87ab16e4c25caa4b52a2905778ae4a275d69f9 (diff) | |
download | fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.tar.gz fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.tar.bz2 fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.zip |
Merge branch 'new-fontification-scheme'
Diffstat (limited to 'lisp/ledger-regex.el')
-rw-r--r-- | lisp/ledger-regex.el | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el index bb080b94..460b50ce 100644 --- a/lisp/ledger-regex.el +++ b/lisp/ledger-regex.el @@ -329,7 +329,29 @@ ledger-iso-date-regexp "\\([ *!]+\\)" ;; mark "\\((.*)\\)?" ;; code - "\\(.*\\)" ;; desc + "\\([[:word:] ]+\\)" ;; desc "\\)")) +(defconst ledger-xact-start-regex + (concat ledger-iso-date-regexp ;; subexp 1 + " ?\\([ *!]\\)" ;; mark, subexp 5 + " ?\\((.*)\\)?" ;; code, subexp 6 + " ?\\([^;\n]+\\)" ;; desc, subexp 7 + "\\(\n\\|;.*\\)" ;; comment, subexp 8 + )) + +(defconst ledger-posting-regex + (concat "^[ \t]+ ?" ;; initial white space + "\\([*!]\\)? ?" ;; state, subexpr 1 + "\\([[:word:]: ]+\\(\n\\|[ \t][ \t]\\)\\)" ;; account, subexpr 2 + "\\([^;\n]*\\)" ;; amount, subexpr 4 + "\\(.*\\)" ;; comment, subexpr 5 + )) + + + +(defconst ledger-directive-start-regex + "[=~;#%|\\*[A-Za-z]") + + (provide 'ledger-regex) |