mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #804 - URL link and break line
- Addressed bug #804 by allowing rc.hyphenate to control whether hyphens are inserted when long lines are broken. This may help prevent xterm from mis-parsing URLs in task annotations, when wrapped (thanks to Yann Davin). - Added unit tests.
This commit is contained in:
parent
08fcb5362e
commit
7dd3e081c7
20 changed files with 147 additions and 28 deletions
|
@ -71,6 +71,8 @@ ColumnDescription::ColumnDescription ()
|
|||
+ " " + t + " " + a4);
|
||||
_examples.push_back (d.substr (0, 20) + "...");
|
||||
_examples.push_back (d + " [4]");
|
||||
|
||||
_hyphenate = context.config.getBoolean ("hyphenate");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -199,7 +201,7 @@ void ColumnDescription::render (
|
|||
}
|
||||
|
||||
std::vector <std::string> raw;
|
||||
wrapText (raw, description, width);
|
||||
wrapText (raw, description, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
|
@ -210,7 +212,7 @@ void ColumnDescription::render (
|
|||
else if (_style == "desc")
|
||||
{
|
||||
std::vector <std::string> raw;
|
||||
wrapText (raw, description, width);
|
||||
wrapText (raw, description, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
|
@ -237,7 +239,7 @@ void ColumnDescription::render (
|
|||
}
|
||||
|
||||
std::vector <std::string> raw;
|
||||
wrapText (raw, description, width);
|
||||
wrapText (raw, description, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
|
@ -264,7 +266,7 @@ void ColumnDescription::render (
|
|||
description += " [" + format ((int) annos.size ()) + "]";
|
||||
|
||||
std::vector <std::string> raw;
|
||||
wrapText (raw, description, width);
|
||||
wrapText (raw, description, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue