Fix to commodity printing
This commit is contained in:
parent
0f180b917a
commit
b5e76f0056
1 changed files with 8 additions and 3 deletions
|
|
@ -265,9 +265,14 @@ public:
|
|||
|
||||
virtual void print(std::ostream& out, bool elide_quotes = false,
|
||||
bool print_annotations = false) const {
|
||||
commodity_t::print(out, elide_quotes);
|
||||
if (print_annotations)
|
||||
write_annotations(out);
|
||||
if (print_annotations) {
|
||||
std::ostringstream buf;
|
||||
commodity_t::print(buf, elide_quotes);
|
||||
write_annotations(buf);
|
||||
out << buf.str();
|
||||
} else {
|
||||
commodity_t::print(out, elide_quotes);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void write_annotations(std::ostream& out,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue