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(-) 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