From 0925eb53b4c94cff4843b6ed6e1c955d3ba1e2a0 Mon Sep 17 00:00:00 2001 From: Donald Lam Date: Sun, 15 Jan 2023 16:19:18 -0800 Subject: 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. --- src/report.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/report.cc') diff --git a/src/report.cc b/src/report.cc index 37bcb332..1c654e75 100644 --- a/src/report.cc +++ b/src/report.cc @@ -765,7 +765,7 @@ value_t report_t::fn_quoted(call_scope_t& args) return string_value(out.str()); } -value_t report_t::fn_quoted_rfc4180(call_scope_t& args) +value_t report_t::fn_quoted_rfc(call_scope_t& args) { std::ostringstream out; @@ -1498,8 +1498,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind, case 'q': if (is_eq(p, "quoted")) return MAKE_FUNCTOR(report_t::fn_quoted); - else if (is_eq(p, "quoted_rfc4180")) - return MAKE_FUNCTOR(report_t::fn_quoted_rfc4180); + else if (is_eq(p, "quoted_rfc")) + return MAKE_FUNCTOR(report_t::fn_quoted_rfc); else if (is_eq(p, "quantity")) return MAKE_FUNCTOR(report_t::fn_quantity); break; -- cgit v1.2.3