diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-10 02:54:36 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-10 02:54:36 -0400 |
commit | 548a03e725752d2a61a76fb3d3ebb736f88c0afa (patch) | |
tree | caaffdad8cdfec4f2027a074cda2c0f9a49a2369 /src/main.cc | |
parent | 7ffb6c472c840acf8df5a3dd652d1c111787f87f (diff) | |
download | fork-ledger-548a03e725752d2a61a76fb3d3ebb736f88c0afa.tar.gz fork-ledger-548a03e725752d2a61a76fb3d3ebb736f88c0afa.tar.bz2 fork-ledger-548a03e725752d2a61a76fb3d3ebb736f88c0afa.zip |
Regular expressions supplied after 'reg' or 'bal' are working again.
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main.cc b/src/main.cc index 0b89c9f1..b756b6e5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -164,20 +164,16 @@ namespace ledger { value_t operator()(call_scope_t& args) { - report_t& report(find_scope<report_t>(args)); - var_t<string> format(args, format_name); + report_t& report(find_scope<report_t>(args)); + var_t<string> format(args, format_name); if (! report.format_string.empty()) *format = report.format_string; - if (args.value().is_sequence() && - args.value().size() > 1) { - if (! report.predicate.empty()) - report.predicate = string("(") + report.predicate + ")&"; - report.predicate += - args_to_predicate(++args.value().as_sequence().begin(), - args.value().as_sequence().end()); - } + if (args.value().size() > 0) + report.append_predicate + (args_to_predicate(args.value().as_sequence().begin(), + args.value().as_sequence().end())); (report.*report_method)(handler_ptr(new Formatter(report, *format))); |