mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug Fix - extra line in ghistory report
- Fixed bug that added an extra line between header and graph in the ghistory report.
This commit is contained in:
parent
5814432366
commit
f7fc455b62
3 changed files with 27 additions and 0 deletions
|
@ -17,6 +17,9 @@
|
||||||
+ The "append", and "done" commands now allow modifications to be applied
|
+ The "append", and "done" commands now allow modifications to be applied
|
||||||
to the task(s) (thanks to David J Patrick).
|
to the task(s) (thanks to David J Patrick).
|
||||||
+ Improved word wrapping in various output.
|
+ Improved word wrapping in various output.
|
||||||
|
+ Fixed bug that added an extra line between header and graph in the
|
||||||
|
ghistory report.
|
||||||
|
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,8 @@
|
||||||
<li>The "append", and "done" commands now allow modifications to be applied
|
<li>The "append", and "done" commands now allow modifications to be applied
|
||||||
to the task(s) (thanks to David J Patrick).
|
to the task(s) (thanks to David J Patrick).
|
||||||
<li>Improved word wrapping in various output.
|
<li>Improved word wrapping in various output.
|
||||||
|
<li>Fixed bug that added an extra line between header and graph in the
|
||||||
|
ghistory report.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -803,6 +803,27 @@ void Table::optimize (std::string& output) const
|
||||||
Much better.
|
Much better.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
char* patterns[] =
|
||||||
|
{
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
};
|
||||||
|
|
||||||
|
std::string::size_type trailing;
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
trailing = output.find (patterns[i]);
|
||||||
|
if (trailing != std::string::npos)
|
||||||
|
output.replace (trailing, strlen (patterns[i]), "\n");
|
||||||
|
}
|
||||||
|
while (trailing != std::string::npos);
|
||||||
|
}
|
||||||
|
|
||||||
// std::cout << int ((100 * (start - output.length ()) / start))
|
// std::cout << int ((100 * (start - output.length ()) / start))
|
||||||
// << "%" << std::endl;
|
// << "%" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -1103,6 +1124,7 @@ const std::string Table::render (int maximum /* = 0 */)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
optimize (output);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue