summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-21 19:05:30 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-21 19:05:30 -0400
commit6b9c83b156d44984ae58f47b173fe743f19d8188 (patch)
treeaece6d07a18dbe154f15fa96cdb1dc6ad9d739a0 /src/report.cc
parent509f4505fcd05069180d9ff3d74245001a1391e3 (diff)
downloadfork-ledger-6b9c83b156d44984ae58f47b173fe743f19d8188.tar.gz
fork-ledger-6b9c83b156d44984ae58f47b173fe743f19d8188.tar.bz2
fork-ledger-6b9c83b156d44984ae58f47b173fe743f19d8188.zip
Use more general scrub valexpr function in formats
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/report.cc b/src/report.cc
index a9c930b0..47e8d8c4 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -143,6 +143,11 @@ value_t report_t::fn_market_value(call_scope_t& args)
value_t report_t::fn_strip(call_scope_t& args)
{
+ return args[0].strip_annotations(what_to_keep());
+}
+
+value_t report_t::fn_scrub(call_scope_t& args)
+{
value_t temp(args[0].strip_annotations(what_to_keep()));
if (HANDLED(base))
return temp;
@@ -632,7 +637,9 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
break;
case 's':
- if (is_eq(p, "strip"))
+ if (is_eq(p, "scrub"))
+ return MAKE_FUNCTOR(report_t::fn_scrub);
+ else if (is_eq(p, "strip"))
return MAKE_FUNCTOR(report_t::fn_strip);
break;