summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/report.cc6
-rw-r--r--src/report.h2
2 files changed, 4 insertions, 4 deletions
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;
diff --git a/src/report.h b/src/report.h
index 79be08ae..d264c777 100644
--- a/src/report.h
+++ b/src/report.h
@@ -182,7 +182,7 @@ public:
value_t fn_abs(call_scope_t& scope);
value_t fn_justify(call_scope_t& scope);
value_t fn_quoted(call_scope_t& scope);
- value_t fn_quoted_rfc4180(call_scope_t& scope);
+ value_t fn_quoted_rfc(call_scope_t& scope);
value_t fn_join(call_scope_t& scope);
value_t fn_format_date(call_scope_t& scope);
value_t fn_format_datetime(call_scope_t& scope);