mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
ENH: tags.data writes one entry per line.
This makes it easier to compare and merge the tags file from different machines. Signed-off-by: Quazgar <quazgar@posteo.de>
This commit is contained in:
parent
13a116a301
commit
ca10d52927
1 changed files with 4 additions and 4 deletions
|
@ -108,7 +108,7 @@ std::string TagInfoDatabase::toJson ()
|
||||||
std::stringstream json;
|
std::stringstream json;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
json << "{";
|
json << "{\n";
|
||||||
|
|
||||||
for (auto& pair : _tagInformation)
|
for (auto& pair : _tagInformation)
|
||||||
{
|
{
|
||||||
|
@ -116,15 +116,15 @@ std::string TagInfoDatabase::toJson ()
|
||||||
|
|
||||||
if (tagInfo.hasCount ())
|
if (tagInfo.hasCount ())
|
||||||
{
|
{
|
||||||
json << (first ? "" : ",")
|
json << (first ? "" : ",\n")
|
||||||
<< "\"" << escape(pair.first, '"') << "\":"
|
<< " \"" << escape(pair.first, '"') << "\":"
|
||||||
<< tagInfo.toJson ();
|
<< tagInfo.toJson ();
|
||||||
|
|
||||||
first = (first ? false : first);
|
first = (first ? false : first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
json << "}";
|
json << "\n}";
|
||||||
|
|
||||||
return json.str ();
|
return json.str ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue