diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-10 22:44:12 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-10 22:44:12 +0200 |
| commit | 8e7a1330ae09f4b6690a42ab113226c45df4bcf8 (patch) | |
| tree | 40a36ad06ed4afe799df1d7ff40ec7aede35ade9 /src/text/json_formatter.cpp | |
| parent | d426b75daa66e0a1c109c59900be2172abe70d19 (diff) | |
| download | Project-Tick-8e7a1330ae09f4b6690a42ab113226c45df4bcf8.tar.gz Project-Tick-8e7a1330ae09f4b6690a42ab113226c45df4bcf8.zip | |
Add shortcut for printing empty compounds
Diffstat (limited to 'src/text/json_formatter.cpp')
| -rw-r--r-- | src/text/json_formatter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text/json_formatter.cpp b/src/text/json_formatter.cpp index d1fce85375..778f57c022 100644 --- a/src/text/json_formatter.cpp +++ b/src/text/json_formatter.cpp @@ -107,6 +107,12 @@ namespace //anonymous void visit(const tag_compound& c) override { + if(c.size() == 0) //No line breaks inside empty compounds please + { + os << "{}"; + return; + } + os << "{\n"; ++indent_lvl; unsigned int i = 0; |
