Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidy up HTML.

  • Loading branch information...
commit 01769e2519e7188158d51429c763cc0e1a7c9bc0 1 parent b476e5f
@pjcj authored
View
2  META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Devel-Cover
-version: 0.55
+version: 0.58
version_from:
installdirs: site
requires:
View
31 cpancover
@@ -355,27 +355,20 @@ bgcolor="[% colours.$colour %]"
EOT
$Templates{html} = <<'EOT';
-[% PROCESS colours %]
-<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<!--
-
This file was generated by Devel::Cover Version 0.58
-
-Devel::Cover is copyright 2001-2006, Paul Johnson (pjcj@cpan.org)
-
-Devel::Cover is free. It is licensed under the same terms as Perl itself.
-
+Devel::Cover is copyright 2001-2006, Paul Johnson (pjcj\@cpan.org)
+Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-
-->
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
- "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+[% PROCESS colours %]
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cpancover.css"></link>
<title> [% title %] </title>
@@ -394,8 +387,8 @@ $Templates{summary} = <<'EOT';
<table border="2">
[% IF modules %]
- <tr align="RIGHT" valign="CENTER">
- <th class="header" align="LEFT"> File </th>
+ <tr align="right" valign="middle">
+ <th class="header" align="left"> File </th>
[% FOREACH header = headers %]
<th class="header"> [% header %] </th>
[% END %]
@@ -403,8 +396,8 @@ $Templates{summary} = <<'EOT';
[% END %]
[% FOREACH module = modules %]
- <tr align="RIGHT" valign="CENTER">
- <td align="LEFT">
+ <tr align="right" valign="middle">
+ <td align="left">
<a href="[%- vals.$module.link -%]"> [% module %] </a>
</td>
View
22 lib/Devel/Cover/Report/Html_basic.pm
@@ -104,13 +104,13 @@ sub _highlight_ppi {
my $pretty = $highlight->html($document);
my $split = '<span class="line_number">';
-
+
# turn significant whitespace into &nbsp;
@all_lines = map {
$_ =~ s{</span>( +)}{"</span>" . ("&nbsp;" x length($1))}e;
"$split$_";
} split /$split/, $pretty;
-
+
# remove the line number
@all_lines = map {
s{<span class="line_number">.*?</span>}{}; $_;
@@ -118,7 +118,7 @@ sub _highlight_ppi {
@all_lines = map {
s{<span class="line_number">}{}; $_;
} @all_lines;
-
+
# remove the BR
@all_lines = map {
s{<br>$}{}; $_;
@@ -126,7 +126,7 @@ sub _highlight_ppi {
@all_lines = map {
s{<br>\n</span>}{</span>}; $_;
} @all_lines;
-
+
shift @all_lines if $all_lines[0] eq "";
return @all_lines;
}
@@ -164,7 +164,7 @@ sub print_file
my @all_lines = <F>;
@all_lines = _highlight(@all_lines) if $HAVE_HIGHLIGHTER;
-
+
my $linen = 1;
LINE: while (defined(my $l = shift @all_lines))
{
@@ -462,7 +462,10 @@ sub fetch
}
$Templates{html} = <<'EOT';
-<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 0.58
Devel::Cover is copyright 2001-2006, Paul Johnson (pjcj\@cpan.org)
@@ -470,12 +473,8 @@ Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<title> [% title %] </title>
@@ -842,7 +841,6 @@ pre,.s {
* c2 : coverage >= 90%
* c3 : path covered or coverage = 100%
*/
- c0, .c1, .c2, .c3 { text-align: right; }
.c0 {
background-color: #ff9999;
border: solid 1px #cc0000;
View
17 lib/Devel/Cover/Report/Html_minimal.pm
@@ -256,7 +256,10 @@ sub print_html_header {
my $title = shift;
print $fh <<"END_HTML";
-<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 0.58
Devel::Cover is copyright 2001-2006, Paul Johnson (pjcj\@cpan.org)
@@ -264,14 +267,12 @@ Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
- "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
-<meta http-equiv="Content-Language" content="en-us"></meta>
-<link rel="stylesheet" type="text/css" href="cover.css"></link>
-<title>$title</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
+ <meta http-equiv="Content-Language" content="en-us"></meta>
+ <link rel="stylesheet" type="text/css" href="cover.css"></link>
+ <link rel="stylesheet" type="text/css" href="cover.css"></link>
+ <title>$title</title>
</head>
END_HTML
Please sign in to comment.
Something went wrong with that request. Please try again.