summaryrefslogtreecommitdiff
path: root/src/post.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-03-07 22:47:07 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-03-08 01:11:48 -0500
commit75b7294a6db10e7f7b18b6aeef1aa0f568124a1d (patch)
tree0fecbc12acaacb33cf3c241c536de3347d2742ed /src/post.cc
parent7e79cd82cd4ad5f87f40e6beebdb53e65bb11168 (diff)
downloadfork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.tar.gz
fork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.tar.bz2
fork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.zip
Rewrite the "print" command as a custom function
There ended up being too many corner cases for the generalized formatter to handle.
Diffstat (limited to 'src/post.cc')
-rw-r--r--src/post.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/post.cc b/src/post.cc
index 5850fc3e..41ae04dd 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -576,7 +576,7 @@ void to_xml(std::ostream& out, const post_t& post)
if (post.metadata) {
push_xml y(out, "metadata");
foreach (const item_t::string_map::value_type& pair, *post.metadata) {
- if (pair.second) {
+ if (pair.second.first) {
push_xml z(out, "variable");
{
push_xml z(out, "key");
@@ -584,7 +584,7 @@ void to_xml(std::ostream& out, const post_t& post)
}
{
push_xml z(out, "value");
- out << y.guard(*pair.second);
+ out << y.guard(*pair.second.first);
}
} else {
push_xml z(out, "tag");