Correction to ldg-context xact regex.
This commit is contained in:
parent
67ce56e37c
commit
d97048cf42
1 changed files with 22 additions and 21 deletions
|
|
@ -37,8 +37,8 @@
|
||||||
(defconst comment-string "[ \t]*;[ \t]*\\(.*?\\)")
|
(defconst comment-string "[ \t]*;[ \t]*\\(.*?\\)")
|
||||||
(defconst nil-string "\\([ \t]+\\)")
|
(defconst nil-string "\\([ \t]+\\)")
|
||||||
(defconst commodity-string "\\(.+?\\)")
|
(defconst commodity-string "\\(.+?\\)")
|
||||||
(defconst date-string "^\\(\\([0-9]\\{4\\}[/-]\\)?[01]?[0-9][/-][0123]?[0-9]\\)")
|
(defconst date-string "^\\([0-9]\\{4\\}[/-][01]?[0-9][/-][0123]?[0-9]\\)")
|
||||||
(defconst code-string "\\((\\(.*\\))\\)?")
|
(defconst code-string "\\((.*)\\)?")
|
||||||
(defconst payee-string "\\(.*\\)")
|
(defconst payee-string "\\(.*\\)")
|
||||||
|
|
||||||
(defmacro line-regex (&rest elements)
|
(defmacro line-regex (&rest elements)
|
||||||
|
|
@ -67,16 +67,17 @@
|
||||||
,elements))
|
,elements))
|
||||||
|
|
||||||
(defconst ledger-line-config
|
(defconst ledger-line-config
|
||||||
(list (list 'xact (list (single-line-config date nil status nil nil code payee comment)
|
(list (list 'xact (list (single-line-config date nil status nil code nil payee nil comment)
|
||||||
(single-line-config date nil status nil nil code payee)))
|
(single-line-config date nil status nil code nil payee)
|
||||||
|
(single-line-config date nil status nil payee)))
|
||||||
(list 'acct-transaction (list (single-line-config indent comment)
|
(list 'acct-transaction (list (single-line-config indent comment)
|
||||||
(single-line-config indent status account nil commodity amount nil comment)
|
(single-line-config2 indent status account nil commodity amount nil comment)
|
||||||
(single-line-config indent status account nil commodity amount)
|
(single-line-config2 indent status account nil commodity amount)
|
||||||
(single-line-config indent status account nil amount nil commodity comment)
|
(single-line-config2 indent status account nil amount nil commodity comment)
|
||||||
(single-line-config indent status account nil amount nil commodity)
|
(single-line-config2 indent status account nil amount nil commodity)
|
||||||
(single-line-config indent status account nil amount)
|
(single-line-config2 indent status account nil amount)
|
||||||
(single-line-config indent status account nil comment)
|
(single-line-config2 indent status account nil comment)
|
||||||
(single-line-config indent status account)))))
|
(single-line-config2 indent status account)))))
|
||||||
|
|
||||||
(defun ledger-extract-context-info (line-type pos)
|
(defun ledger-extract-context-info (line-type pos)
|
||||||
"Get context info for current line with LINE-TYPE.
|
"Get context info for current line with LINE-TYPE.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue