summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ledger.texi5
-rw-r--r--lisp/ldg-mode.el4
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/ledger.texi b/doc/ledger.texi
index ac7bfc5f..8389c383 100644
--- a/doc/ledger.texi
+++ b/doc/ledger.texi
@@ -1305,8 +1305,9 @@ The format of each following posting is:
ACCOUNT AMOUNT [; NOTE]
@end example
-The @samp{ACCOUNT} may be surrounded by parentheses if it is a virtual
-postings, or square brackets if it is a virtual postings that
+Note that there must be at least two spaces between @samp{ACCOUNT} and
+@samp{AMOUNT}. The @samp{ACCOUNT} may be surrounded by parentheses if it
+is a virtual posting or square brackets if it is a virtual posting that
must balance. The @samp{AMOUNT} can be followed by a per-unit
posting cost, by specifying @samp{@@ AMOUNT}, or a complete
posting cost with @samp{@@@@ AMOUNT}. Lastly, the @samp{NOTE} may
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el
index 3e9a9106..cc9e8d92 100644
--- a/lisp/ldg-mode.el
+++ b/lisp/ldg-mode.el
@@ -10,8 +10,8 @@
;;("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)"
;; 2 font-lock-type-face)
("^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*:
- ]+?:[^]);
- ]+?\\([])]\\)?\\)\\( \\| \\|$\\)"
+ ]+?:\\([^]);
+ ]\\|\\s-\\)+?\\([])]\\)?\\)\\( \\| \\|$\\)"
2 font-lock-keyword-face)
("^\\([~=].+\\)" 1 font-lock-function-name-face)
("^\\([A-Za-z]+ .+\\)" 1 font-lock-function-name-face))