Bug Fix - Bug #241

- Fixed bug #241 that caused redirected output to retain color control codes
  for colored header and footnotes (thanks to John Florian).
This commit is contained in:
Paul Beckingham 2009-08-04 16:59:12 -06:00
parent b28575625e
commit d39e45841d
2 changed files with 14 additions and 3 deletions

View file

@ -13,6 +13,8 @@
+ Fixed bug that allowed a recurring task to be added without a due date.
+ Fixed bug #243 that caused exported due dates to be quoted, which then
confused a subsequent import (thanks to John Florian).
+ Fixed bug #241 that caused redirected output to retain color control codes
for colored header and footnotes (thanks to John Florian).
------ old releases ------------------------------

View file

@ -148,18 +148,27 @@ int Context::run ()
// Dump all debug messages.
if (config.get (std::string ("debug"), false))
foreach (d, debugMessages)
std::cout << colorizeDebug (*d) << std::endl;
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeDebug (*d) << std::endl;
else
std::cout << *d << std::endl;
// Dump all headers.
foreach (h, headers)
std::cout << colorizeHeader (*h) << std::endl;
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeHeader (*h) << std::endl;
else
std::cout << *h << std::endl;
// Dump the report output.
std::cout << output;
// Dump all footnotes.
foreach (f, footnotes)
std::cout << colorizeFootnote (*f) << std::endl;
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeFootnote (*f) << std::endl;
else
std::cout << *f << std::endl;
return 0;
}