From 10895d6237cfd9a70654ae6feafdcc773ddb93d4 Mon Sep 17 00:00:00 2001 From: Gina White Date: Sat, 12 Nov 2016 15:37:55 -0800 Subject: document quoted_rfc4180 --- doc/ledger3.texi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 4427b8e7..b26e8cf6 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -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 -- cgit v1.2.3 From 37beb581812d788ebedbb325b58e8db7682cc3a4 Mon Sep 17 00:00:00 2001 From: Gina White Date: Sat, 12 Nov 2016 16:04:32 -0800 Subject: doc quoted_rfc4180 in man page --- doc/ledger.1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/ledger.1 b/doc/ledger.1 index 80649496..141d245c 100644 --- a/doc/ledger.1 +++ b/doc/ledger.1 @@ -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 -- cgit v1.2.3