summaryrefslogtreecommitdiff
path: root/doc/ledger3.texi
diff options
context:
space:
mode:
authorDonald Lam <brainy.runt@gmail.com>2023-01-15 16:19:18 -0800
committerMartin Michlmayr <tbm@cyrius.com>2023-01-25 11:15:59 +0800
commit0925eb53b4c94cff4843b6ed6e1c955d3ba1e2a0 (patch)
treefcb94078ba7bf3f654bf91e2ba03491916d9c4bf /doc/ledger3.texi
parentdfae685fbc7a445367d71e31a385d3e60b624f98 (diff)
downloadfork-ledger-0925eb53b4c94cff4843b6ed6e1c955d3ba1e2a0.tar.gz
fork-ledger-0925eb53b4c94cff4843b6ed6e1c955d3ba1e2a0.tar.bz2
fork-ledger-0925eb53b4c94cff4843b6ed6e1c955d3ba1e2a0.zip
Rename quoted_rfc4180 to quoted_rfc, to avoid parser quirk
Ledger's expression parser considers quoted_rfc4180 to be an amount (quantity 4180 of commodity "quoted_rfc"). Fixes #2007.
Diffstat (limited to 'doc/ledger3.texi')
-rw-r--r--doc/ledger3.texi17
1 files changed, 6 insertions, 11 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 9a538d99..db154873 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -8518,7 +8518,8 @@ 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. If expression contains a double-quote, it will be escaped with a backslash.
+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
@@ -8528,16 +8529,10 @@ $ ledger -f expr.dat --format "%(quoted(account)) %(quoted(amount))\n" reg
@end smallexample
@end defun
-@c @defun quoted_rfc4180 expression
-@c Surround @var{expression} with double-quotes, compliant with RFC 4180. If expression contains a double-quote, it will be represented with two double-quotes.
-@c @smallexample @c command:EAD8AA7,with_input:3406FC1
-@c $ ledger -f expr.dat --format "%(quoted_rfc4180(account)) %(quoted_rfc4180(amount))\n" reg
-@c @end smallexample
-@c @smallexample @c output:EAD8AA7
-@c "Assets:Cash" "¤ -123,45"
-@c "Expenses:Office Supplies" "¤ 123,45"
-@c @end smallexample
-@c @end defun
+@defun quoted_rfc expression
+Similar, except an embedded double quote would be escaped by
+preceding it with another double quote, as prescribed by RFC 4180.
+@end defun
@defun round
@value{FIXME:UNDOCUMENTED}