[SCM] Debian package checker branch, master, updated. 2.5.2-83-g399e036
The following commit has been merged in the master branch:
commit 399e036450f7410a212a5f0a322297db7aa1fca2
Author: Niels Thykier <niels@thykier.net>
Date: Sat Sep 3 12:19:39 2011 +0200
Remove the last newline before the </pre> if any
This should reduce the weird spacing after litteral lines in the
html output.
diff --git a/debian/changelog b/debian/changelog
index ea7df5c..1c7df6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -163,6 +163,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
+ [NT] Close <p>-tags in dtml_to_html since the output is used
in xhtml (xml), where all tags must be closed properly.
(Closes: #639292)
+ + [NT] Remove the last new line (if any) before a </pre> in tag
+ to reduce the empty space to the next paragraph.
* private/*:
+ [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
diff --git a/lib/Text_utils.pm b/lib/Text_utils.pm
index fba30d5..b52cc73 100644
--- a/lib/Text_utils.pm
+++ b/lib/Text_utils.pm
@@ -142,14 +142,18 @@ sub dtml_to_html {
# normal line
else {
if ($pre) {
- push(@o,'</pre>');
+ my $last = pop @o;
+ $last =~ s,\n?$,</pre>\n,o;
+ push @o, $last;
$pre=0;
}
push(@o,"<p>$_</p>\n");
}
}
if ($pre) {
- push(@o,'</pre>');
+ my $last = pop @o;
+ $last =~ s,\n?$,</pre>\n,o;
+ push @o, $last;
$pre=0;
}
--
Debian package checker
Reply to: