Merge pull request #480 from ginabythebay/next

document quoted_rfc4180
This commit is contained in:
John Wiegley 2016-11-12 16:55:06 -08:00 committed by GitHub
commit a5fa6d67ca
2 changed files with 16 additions and 1 deletions

View file

@ -1283,6 +1283,10 @@ for values that have a per-unit cost.
Surround
.Ar expression
with double-quotes.
.It Fn quoted_rfc4180 expression
Surround
.Ar expression
with double-quotes, compatible with rfc 4180.
.It Sy real
.\" Is there a difference between real and actual?
Return true if the transaction is real, i.e not a automated or virtual

View file

@ -8360,7 +8360,18 @@ Return the quantity of @var{value} for values that have a per-unit cost.
@end defun
@defun quoted expression
Surround @var{expression} with double-quotes.
Surround @var{expression} with double-quotes. If expression contains a double-quote, it will be escaped with a backslash.
@smallexample @c command:EAD8AA7,with_input:3406FC1
$ ledger -f expr.dat --format "%(quoted(account)) %(quoted(amount))\n" reg
@end smallexample
@smallexample @c output:EAD8AA7
"Assets:Cash" "¤ -123,45"
"Expenses:Office Supplies" "¤ 123,45"
@end smallexample
@end defun
@defun quoted_rfc4180 expression
Surround @var{expression} with double-quotes, compliant with rfc 4180. If expression contains a double-quote, it will be represented with two double-quotes.
@smallexample @c command:EAD8AA7,with_input:3406FC1
$ ledger -f expr.dat --format "%(quoted(account)) %(quoted(amount))\n" reg
@end smallexample