[lintian] 01/01: L::T::TextUtil: Avoid breaking long URLs in tag descriptions
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ce43e32df418f3b64ffc5e6c4010bd4aae6854a6
Author: Niels Thykier <niels@thykier.net>
Date: Sun Aug 25 22:00:44 2013 +0200
L::T::TextUtil: Avoid breaking long URLs in tag descriptions
Signed-off-by: Niels Thykier <niels@thykier.net>
---
debian/changelog | 4 ++++
lib/Lintian/Tag/TextUtil.pm | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 861bb22..e3d6134 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,10 @@ lintian (2.5.17) UNRELEASED; urgency=low
+ [NT] Add Build-Depends on aspell, aspell-en and
libtest-spelling-perl.
+ * lib/Lintian/Tag/TextUtil.pm:
+ + [NT] Prevent very long URLs from being split into two
+ lines. Thanks to Jari Aalto for the report.
+ (Closes: #719769)
* lib/Lintian/Util.pm:
+ [NT] Prefer paths without leading slash in the
documentation for normalize_pkg_path. Thanks to
diff --git a/lib/Lintian/Tag/TextUtil.pm b/lib/Lintian/Tag/TextUtil.pm
index ad31ccc..511e133 100644
--- a/lib/Lintian/Tag/TextUtil.pm
+++ b/lib/Lintian/Tag/TextUtil.pm
@@ -200,6 +200,10 @@ sub wrap_paragraphs {
}
my $o;
+ # Tell Text::Wrap that very long "words" (e.g. URLs) should rather
+ # "overflow" the column width than be broken into multiple lines.
+ # (#719769)
+ local $Text::Wrap::huge = 'overflow';
for my $t (split_paragraphs(@_)) {
# empty or indented line?
if ($t eq '' or $t =~ /^\s/) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: