summaryrefslogtreecommitdiff
path: root/lib/rdoc/generators
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-13 10:27:52 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-13 10:27:52 +0000
commitc9bfc9bb43bf39e70d5e9a25054641817238a83e (patch)
treec2a1369794c508e5655fe922260be7617f969182 /lib/rdoc/generators
parent016f0e0c84e616f17ddadd20ac783009332c5245 (diff)
* lib/rdoc/diagram.rb:
- properly quote bare element attributes - terminates dangling elements (e.g. <img>, <br>, <link>, etc) - converts "CVS" to the more HTML-friendly acronym element - adds missing type attributes to style elements based on Paul Duncan's patch <pabs@pablotron.org> [ruby-core:7028] * lib/rdoc/generators/html_generator.rb: ditto. * lib/rdoc/generators/template/html/hefss.rb: ditto. * lib/rdoc/generators/template/html/html.rb: ditto. * lib/rdoc/generators/template/html/kilmer.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generators')
-rw-r--r--lib/rdoc/generators/html_generator.rb2
-rw-r--r--lib/rdoc/generators/template/html/hefss.rb52
-rw-r--r--lib/rdoc/generators/template/html/html.rb6
-rw-r--r--lib/rdoc/generators/template/html/kilmer.rb48
-rw-r--r--lib/rdoc/generators/template/html/old_html.rb6
5 files changed, 57 insertions, 57 deletions
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index d263a14784..be79226c8e 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -153,7 +153,7 @@ module Generators
if (type == "http" || type == "link") &&
url =~ /\.(gif|png|jpg|jpeg|bmp)$/
- "<img src=\"#{url}\">"
+ "<img src=\"#{url}\" />"
else
"<a href=\"#{url}\">#{text.sub(%r{^#{type}:/*}, '')}</a>"
end
diff --git a/lib/rdoc/generators/template/html/hefss.rb b/lib/rdoc/generators/template/html/hefss.rb
index ff4f557b71..e68ca85823 100644
--- a/lib/rdoc/generators/template/html/hefss.rb
+++ b/lib/rdoc/generators/template/html/hefss.rb
@@ -114,7 +114,7 @@ BODY = %{
<html><head>
<title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
- <link rel=StyleSheet href="%style_url%" type="text/css" media=screen>
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
<script type="text/javascript" language="JavaScript">
<!--
function popCode(url) {
@@ -138,9 +138,9 @@ IF:description
ENDIF:description
IF:requires
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Required files</td></tr>
-</table><br>
+</table><br />
<div class="name-list">
START:requires
HREF:aref:name:
@@ -149,9 +149,9 @@ ENDIF:requires
</div>
IF:methods
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Subroutines and Functions</td></tr>
-</table><br>
+</table><br />
<div class="name-list">
START:methods
HREF:aref:name:,
@@ -160,10 +160,10 @@ END:methods
ENDIF:methods
IF:attributes
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Arguments</td></tr>
-</table><br>
-<table cellspacing=5>
+</table><br />
+<table cellspacing="5">
START:attributes
<tr valign="top">
IF:rw
@@ -180,10 +180,10 @@ END:attributes
ENDIF:attributes
IF:classlist
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Modules</td></tr>
-</table><br>
-%classlist%<br>
+</table><br />
+%classlist%<br />
ENDIF:classlist
!INCLUDE! <!-- method descriptions -->
@@ -198,13 +198,13 @@ FILE_PAGE = <<_FILE_PAGE_
<table width="100%">
<tr class="title-row">
<td><table width="100%"><tr>
- <td class="big-title-font" colspan=2><font size=-3><B>File</B><BR></font>%short_name%</td>
- <td align="right"><table cellspacing=0 cellpadding=2>
+ <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font>%short_name%</td>
+ <td align="right"><table cellspacing="0" cellpadding="2">
<tr>
<td class="small-title-font">Path:</td>
<td class="small-title-font">%full_path%
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
</td>
</tr>
@@ -215,26 +215,26 @@ ENDIF:cvsurl
</table>
</td></tr></table></td>
</tr>
-</table><br>
+</table><br />
_FILE_PAGE_
###################################################################
CLASS_PAGE = %{
-<table width="100%" border=0 cellspacing=0>
+<table width="100%" border="0" cellspacing="0">
<tr class="title-row">
<td class="big-title-font">
- <font size=-3><B>%classmod%</B><BR></font>%full_name%
+ <font size="-3"><b>%classmod%</b><br /></font>%full_name%
</td>
<td align="right">
- <table cellspacing=0 cellpadding=2>
+ <table cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="small-title-font">In:</td>
<td class="small-title-font">
START:infiles
HREF:full_path_url:full_path:
IF:cvsurl
-&nbsp;(<a href="%cvsurl%">CVS</a>)
+&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
END:infiles
</td>
@@ -256,14 +256,14 @@ ENDIF:parent
</table>
</td>
</tr>
-</table><br>
+</table><br />
}
###################################################################
METHOD_LIST = %{
IF:includes
-<div class="tablesubsubtitle">Uses</div><br>
+<div class="tablesubsubtitle">Uses</div><br />
<div class="name-list">
START:includes
<span class="method-name">HREF:aref:name:</span>
@@ -274,11 +274,11 @@ ENDIF:includes
IF:method_list
START:method_list
IF:methods
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
</table>
START:methods
-<table width="100%" cellspacing = 0 cellpadding=5 border=0>
+<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="%aref%">
<b>%name%</b>%params%
@@ -307,7 +307,7 @@ SRC_PAGE = %{
<html>
<head><title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
-<style>
+<style type="text/css">
.kw { color: #3333FF; font-weight: bold }
.cmt { color: green; font-style: italic }
.str { color: #662222; font-style: italic }
@@ -339,7 +339,7 @@ FILE_INDEX = %{
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
-<style>
+<style type="text/css">
<!--
body {
background-color: #bbbbbb;
@@ -368,7 +368,7 @@ div.banner {
<body>
<div class="banner">%list_title%</div>
START:entries
-<a href="%href%">%name%</a><br>
+<a href="%href%">%name%</a><br />
END:entries
</body></html>
}
diff --git a/lib/rdoc/generators/template/html/html.rb b/lib/rdoc/generators/template/html/html.rb
index 6bbde46000..7f9e599465 100644
--- a/lib/rdoc/generators/template/html/html.rb
+++ b/lib/rdoc/generators/template/html/html.rb
@@ -322,7 +322,7 @@ FILE_PAGE = %{
<td><strong>Path:</strong></td>
<td>%full_path%
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
</td>
</tr>
@@ -358,7 +358,7 @@ IF:full_path_url
</a>
ENDIF:full_path_url
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
<br />
END:infiles
@@ -504,7 +504,7 @@ IF:aliases
START:aliases
<tr class="top-aligned-row context-row">
<td class="context-item-name">%old_name%</td>
- <td>-></td>
+ <td>-&gt;</td>
<td class="context-item-value">%new_name%</td>
</tr>
IF:desc
diff --git a/lib/rdoc/generators/template/html/kilmer.rb b/lib/rdoc/generators/template/html/kilmer.rb
index 9fbef3573a..55071fc026 100644
--- a/lib/rdoc/generators/template/html/kilmer.rb
+++ b/lib/rdoc/generators/template/html/kilmer.rb
@@ -94,7 +94,7 @@ BODY = %{
<html><head>
<title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
- <link rel=StyleSheet href="%style_url%" type="text/css" media=screen>
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
<script type="text/javascript" language="JavaScript">
<!--
function popCode(url) {
@@ -118,9 +118,9 @@ IF:description
ENDIF:description
IF:requires
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Required files</td></tr>
-</table><br>
+</table><br />
<div class="name-list">
START:requires
HREF:aref:name:
@@ -129,9 +129,9 @@ ENDIF:requires
</div>
IF:methods
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Methods</td></tr>
-</table><br>
+</table><br />
<div class="name-list">
START:methods
HREF:aref:name:,
@@ -152,10 +152,10 @@ ENDIF:seccomment
ENDIF:sectitle
IF:attributes
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Attributes</td></tr>
-</table><br>
-<table cellspacing=5>
+</table><br />
+<table cellspacing="5">
START:attributes
<tr valign="top">
IF:rw
@@ -172,10 +172,10 @@ END:attributes
ENDIF:attributes
IF:classlist
-<table cellpadding=5 width="100%">
+<table cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
-</table><br>
-%classlist%<br>
+</table><br />
+%classlist%<br />
ENDIF:classlist
!INCLUDE! <!-- method descriptions -->
@@ -192,13 +192,13 @@ FILE_PAGE = <<_FILE_PAGE_
<table width="100%">
<tr class="title-row">
<td><table width="100%"><tr>
- <td class="big-title-font" colspan=2><font size=-3><B>File</B><BR></font>%short_name%</td>
- <td align="right"><table cellspacing=0 cellpadding=2>
+ <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font>%short_name%</td>
+ <td align="right"><table cellspacing="0" cellpadding="2">
<tr>
<td class="small-title-font">Path:</td>
<td class="small-title-font">%full_path%
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
</td>
</tr>
@@ -209,26 +209,26 @@ ENDIF:cvsurl
</table>
</td></tr></table></td>
</tr>
-</table><br>
+</table><br />
_FILE_PAGE_
###################################################################
CLASS_PAGE = %{
-<table width="100%" border=0 cellspacing=0>
+<table width="100%" border="0" cellspacing="0">
<tr class="title-row">
<td class="big-title-font">
- <font size=-3><B>%classmod%</B><BR></font>%full_name%
+ <font size="-3"><b>%classmod%</b><br /></font>%full_name%
</td>
<td align="right">
- <table cellspacing=0 cellpadding=2>
+ <table cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="small-title-font">In:</td>
<td class="small-title-font">
START:infiles
HREF:full_path_url:full_path:
IF:cvsurl
-&nbsp;(<a href="%cvsurl%">CVS</a>)
+&nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
END:infiles
</td>
@@ -250,14 +250,14 @@ ENDIF:parent
</table>
</td>
</tr>
-</table><br>
+</table><br />
}
###################################################################
METHOD_LIST = %{
IF:includes
-<div class="tablesubsubtitle">Included modules</div><br>
+<div class="tablesubsubtitle">Included modules</div><br />
<div class="name-list">
START:includes
<span class="method-name">HREF:aref:name:</span>
@@ -272,7 +272,7 @@ IF:methods
<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
</table>
START:methods
-<table width="100%" cellspacing = 0 cellpadding=5 border=0>
+<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="%aref%">
IF:callseq
@@ -319,7 +319,7 @@ SRC_PAGE = %{
<html>
<head><title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
-<style>
+<style type="text/css">
.ruby-comment { color: green; font-style: italic }
.ruby-constant { color: #4433aa; font-weight: bold; }
.ruby-identifier { color: #222222; }
@@ -380,7 +380,7 @@ div.banner {
<body>
<div class="banner">%list_title%</div>
START:entries
-<a href="%href%">%name%</a><br>
+<a href="%href%">%name%</a><br />
END:entries
</body></html>
}
diff --git a/lib/rdoc/generators/template/html/old_html.rb b/lib/rdoc/generators/template/html/old_html.rb
index 9e0073c37e..ca66302a08 100644
--- a/lib/rdoc/generators/template/html/old_html.rb
+++ b/lib/rdoc/generators/template/html/old_html.rb
@@ -497,7 +497,7 @@ FILE_PAGE = <<_FILE_PAGE_
<td class="small-title-font">Path:</td>
<td class="small-title-font">%full_path%
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
</td>
</tr>
@@ -533,7 +533,7 @@ IF:full_path_url
</a>
ENDIF:full_path_url
IF:cvsurl
- &nbsp;(<a href="%cvsurl%">CVS</a>)
+ &nbsp;(<a href="%cvsurl%"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
ENDIF:cvsurl
<br />
END:infiles
@@ -570,7 +570,7 @@ SRC_PAGE = %{
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
<title>%title%</title>
-<link rel=StyleSheet href="%style_url%" type="text/css" media="screen" />
+<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
</head>
<body bgcolor="white">
<pre>%code%</pre>