rdoc 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (95) hide show
  1. data.tar.gz.sig +2 -0
  2. data/.document +4 -0
  3. data/History.txt +35 -0
  4. data/Manifest.txt +36 -15
  5. data/README.txt +11 -27
  6. data/Rakefile +3 -0
  7. data/lib/rdoc.rb +1 -1
  8. data/lib/rdoc/cache.rb +32 -0
  9. data/lib/rdoc/code_objects.rb +121 -59
  10. data/lib/rdoc/generator.rb +196 -133
  11. data/lib/rdoc/generator/darkfish.rb +471 -0
  12. data/lib/rdoc/generator/html.rb +71 -60
  13. data/lib/rdoc/generator/html/html.rb +115 -115
  14. data/lib/rdoc/generator/html/one_page_html.rb +56 -56
  15. data/lib/rdoc/generator/ri.rb +2 -0
  16. data/lib/rdoc/generator/template/darkfish/.document +0 -0
  17. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +302 -0
  18. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +114 -0
  19. data/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  20. data/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  21. data/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  22. data/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  23. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  24. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  25. data/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  26. data/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  27. data/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  28. data/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  29. data/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  30. data/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  31. data/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  32. data/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  33. data/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  34. data/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  35. data/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  36. data/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  37. data/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  38. data/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  39. data/lib/rdoc/generator/template/darkfish/index.rhtml +57 -0
  40. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
  41. data/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
  42. data/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
  43. data/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
  44. data/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
  45. data/lib/rdoc/generator/xml.rb +19 -12
  46. data/lib/rdoc/generator/xml/rdf.rb +50 -50
  47. data/lib/rdoc/generator/xml/xml.rb +58 -58
  48. data/lib/rdoc/known_classes.rb +0 -1
  49. data/lib/rdoc/markup/preprocess.rb +4 -3
  50. data/lib/rdoc/markup/to_html.rb +4 -1
  51. data/lib/rdoc/markup/to_html_crossref.rb +28 -31
  52. data/lib/rdoc/options.rb +25 -20
  53. data/lib/rdoc/parser.rb +10 -2
  54. data/lib/rdoc/parser/c.rb +38 -29
  55. data/lib/rdoc/parser/f95.rb +32 -32
  56. data/lib/rdoc/parser/ruby.rb +5 -2
  57. data/lib/rdoc/parser/simple.rb +1 -0
  58. data/lib/rdoc/rdoc.rb +99 -47
  59. data/lib/rdoc/ri/cache.rb +6 -6
  60. data/lib/rdoc/ri/display.rb +22 -75
  61. data/lib/rdoc/ri/driver.rb +237 -78
  62. data/lib/rdoc/stats.rb +91 -28
  63. data/lib/rdoc/template.rb +6 -2
  64. data/test/test.ja.rdoc +8 -0
  65. data/test/test.ja.txt +8 -0
  66. data/test/test_attribute_manager.rb +9 -6
  67. data/test/test_rdoc_markup.rb +4 -2
  68. data/test/test_rdoc_markup_attribute_manager.rb +13 -3
  69. data/test/test_rdoc_markup_to_html.rb +18 -2
  70. data/test/test_rdoc_markup_to_html_crossref.rb +186 -249
  71. data/test/test_rdoc_parser.rb +17 -1
  72. data/test/test_rdoc_parser_c.rb +65 -10
  73. data/test/test_rdoc_parser_perl.rb +4 -2
  74. data/test/test_rdoc_parser_ruby.rb +6 -4
  75. data/test/test_rdoc_ri_attribute_formatter.rb +4 -2
  76. data/test/test_rdoc_ri_default_display.rb +8 -4
  77. data/test/test_rdoc_ri_driver.rb +4 -2
  78. data/test/test_rdoc_ri_formatter.rb +6 -4
  79. data/test/test_rdoc_ri_overstrike_formatter.rb +4 -2
  80. metadata +84 -33
  81. metadata.gz.sig +0 -0
  82. data/lib/rdoc/generator/chm.rb +0 -113
  83. data/lib/rdoc/generator/chm/chm.rb +0 -100
  84. data/lib/rdoc/generator/html/frameless.rb +0 -92
  85. data/lib/rdoc/generator/html/hefss.rb +0 -150
  86. data/lib/rdoc/generator/html/kilmer.rb +0 -151
  87. data/lib/rdoc/generator/html/kilmerfactory.rb +0 -427
  88. data/lib/rdoc/generator/texinfo.rb +0 -81
  89. data/lib/rdoc/generator/texinfo/class.texinfo.erb +0 -44
  90. data/lib/rdoc/generator/texinfo/file.texinfo.erb +0 -6
  91. data/lib/rdoc/generator/texinfo/method.texinfo.erb +0 -6
  92. data/lib/rdoc/generator/texinfo/texinfo.erb +0 -28
  93. data/test/rdoc_markup_to_html_crossref_reference.rb +0 -31
  94. data/test/test_rdoc_info_formatting.rb +0 -175
  95. data/test/test_rdoc_info_sections.rb +0 -136
@@ -1,10 +1,13 @@
1
1
  require 'rdoc/generator/html'
2
+ require 'rdoc/cache'
2
3
 
3
4
  ##
4
5
  # Generate XML output as one big file
5
6
 
6
7
  class RDoc::Generator::XML < RDoc::Generator::HTML
7
8
 
9
+ RDoc::RDoc.add_generator self
10
+
8
11
  ##
9
12
  # Standard generator factory
10
13
 
@@ -41,19 +44,23 @@ class RDoc::Generator::XML < RDoc::Generator::HTML
41
44
  # class, module, and method names)
42
45
 
43
46
  def build_indices
47
+ template_cache = RDoc::Cache.instance
48
+
44
49
  @info.each do |toplevel|
45
- @files << RDoc::Generator::File.new(toplevel, @options, RDoc::Generator::FILE_DIR)
50
+ @files << RDoc::Generator::File.new(template_cache, toplevel, @options,
51
+ RDoc::Generator::FILE_DIR)
46
52
  end
47
53
 
48
54
  RDoc::TopLevel.all_classes_and_modules.each do |cls|
49
- build_class_list(cls, @files[0], RDoc::Generator::CLASS_DIR)
55
+ build_class_list(template_cache, cls, @files[0], RDoc::Generator::CLASS_DIR)
50
56
  end
51
57
  end
52
58
 
53
- def build_class_list(from, html_file, class_dir)
54
- @classes << RDoc::Generator::Class.new(from, html_file, class_dir, @options)
59
+ def build_class_list(template_cache, from, html_file, class_dir)
60
+ @classes << RDoc::Generator::Class.new(template_cache, from, html_file,
61
+ class_dir, @options)
55
62
  from.each_classmodule do |mod|
56
- build_class_list(mod, html_file, class_dir)
63
+ build_class_list(template_cache, mod, html_file, class_dir)
57
64
  end
58
65
  end
59
66
 
@@ -63,9 +70,9 @@ class RDoc::Generator::XML < RDoc::Generator::HTML
63
70
 
64
71
  def generate_xml
65
72
  values = {
66
- 'charset' => @options.charset,
67
- 'files' => gen_into(@files),
68
- 'classes' => gen_into(@classes)
73
+ :charset => @options.charset,
74
+ :files => gen_into(@files),
75
+ :classes => gen_into(@classes)
69
76
  }
70
77
 
71
78
  template = RDoc::TemplatePage.new @template::ONE_PAGE
@@ -102,14 +109,14 @@ class RDoc::Generator::XML < RDoc::Generator::HTML
102
109
  res = []
103
110
  collection.sort.each do |f|
104
111
  if f.document_self
105
- res << { "href" => f.path, "name" => f.index_name }
112
+ res << { :href => f.path, :name => f.index_name }
106
113
  end
107
114
  end
108
115
 
109
116
  return {
110
- "entries" => res,
111
- 'list_title' => title,
112
- 'index_url' => main_url,
117
+ :entries => res,
118
+ :list_title => title,
119
+ :index_url => main_url,
113
120
  }
114
121
  end
115
122
 
@@ -3,67 +3,67 @@ require 'rdoc/generator/xml'
3
3
  module RDoc::Generator::XML::RDF
4
4
 
5
5
  CONTENTS_RDF = <<-EOF
6
- <% if defined? classes and classes["description"] then %>
6
+ <% if defined? classes and classes[:description] then %>
7
7
  <description rd:parseType="Literal">
8
- <%= classes["description"] %>
8
+ <%= classes[:description] %>
9
9
  </description>
10
10
  <% end %>
11
11
 
12
- <% if defined? files and files["requires"] then %>
13
- <% files["requires"].each do |requires| %>
14
- <rd:required-file rd:name="<%= requires["name"] %>" />
15
- <% end # files["requires"] %>
12
+ <% if defined? files and files[:requires] then %>
13
+ <% files[:requires].each do |requires| %>
14
+ <rd:required-file rd:name="<%= requires[:name] %>" />
15
+ <% end # files[:requires] %>
16
16
  <% end %>
17
17
 
18
- <% if defined? classes and classes["includes"] then %>
18
+ <% if defined? classes and classes[:includes] then %>
19
19
  <IncludedModuleList>
20
- <% classes["includes"].each do |includes| %>
21
- <included-module rd:name="<%= includes["name"] %>" />
22
- <% end # includes["includes"] %>
20
+ <% classes[:includes].each do |includes| %>
21
+ <included-module rd:name="<%= includes[:name] %>" />
22
+ <% end # includes[:includes] %>
23
23
  </IncludedModuleList>
24
24
  <% end %>
25
25
 
26
- <% if defined? classes and classes["sections"] then %>
27
- <% classes["sections"].each do |sections| %>
28
- <% if sections["attributes"] then %>
29
- <% sections["attributes"].each do |attributes| %>
26
+ <% if defined? classes and classes[:sections] then %>
27
+ <% classes[:sections].each do |sections| %>
28
+ <% if sections[:attributes] then %>
29
+ <% sections[:attributes].each do |attributes| %>
30
30
  <contents>
31
- <Attribute rd:name="<%= attributes["name"] %>">
32
- <% if attributes["rw"] then %>
33
- <attribute-rw><%= attributes["rw"] %></attribute-rw>
31
+ <Attribute rd:name="<%= attributes[:name] %>">
32
+ <% if attributes[:rw] then %>
33
+ <attribute-rw><%= attributes[:rw] %></attribute-rw>
34
34
  <% end %>
35
- <description rdf:parseType="Literal"><%= attributes["a_desc"] %></description>
35
+ <description rdf:parseType="Literal"><%= attributes[:a_desc] %></description>
36
36
  </Attribute>
37
37
  </contents>
38
- <% end # sections["attributes"] %>
38
+ <% end # sections[:attributes] %>
39
39
  <% end %>
40
40
 
41
- <% if sections["method_list"] then %>
42
- <% sections["method_list"].each do |method_list| %>
43
- <% if method_list["methods"] then %>
44
- <% method_list["methods"].each do |methods| %>
41
+ <% if sections[:method_list] then %>
42
+ <% sections[:method_list].each do |method_list| %>
43
+ <% if method_list[:methods] then %>
44
+ <% method_list[:methods].each do |methods| %>
45
45
  <contents>
46
- <Method rd:name="<%= methods["name"] %>" rd:visibility="<%= methods["type"] %>"
47
- rd:category="<%= methods["category"] %>" rd:id="<%= methods["aref"] %>">
48
- <parameters><%= methods["params"] %></parameters>
49
- <% if methods["m_desc"] then %>
46
+ <Method rd:name="<%= methods[:name] %>" rd:visibility="<%= methods[:type] %>"
47
+ rd:category="<%= methods[:category] %>" rd:id="<%= methods[:aref] %>">
48
+ <parameters><%= methods[:params] %></parameters>
49
+ <% if methods[:m_desc] then %>
50
50
  <description rdf:parseType="Literal">
51
- <%= methods["m_desc"] %>
51
+ <%= methods[:m_desc] %>
52
52
  </description>
53
53
  <% end %>
54
- <% if methods["sourcecode"] then %>
54
+ <% if methods[:sourcecode] then %>
55
55
  <source-code-listing rdf:parseType="Literal">
56
- <%= methods["sourcecode"] %>
56
+ <%= methods[:sourcecode] %>
57
57
  </source-code-listing>
58
58
  <% end %>
59
59
  </Method>
60
60
  </contents>
61
- <% end # method_list["methods"] %>
61
+ <% end # method_list[:methods] %>
62
62
  <% end %>
63
- <% end # sections["method_list"] %>
63
+ <% end # sections[:method_list] %>
64
64
  <% end %>
65
65
  <!-- end method list -->
66
- <% end # classes["sections"] %>
66
+ <% end # classes[:sections] %>
67
67
  <% end %>
68
68
  EOF
69
69
 
@@ -75,36 +75,36 @@ module RDoc::Generator::XML::RDF
75
75
  xmlns:rd="http://pragprog.com/rdoc/rdoc.rdf#">
76
76
 
77
77
  <!-- RDoc -->
78
- <% values["files"].each do |files| %>
79
- <rd:File rd:name="<%= files["short_name"] %>" rd:id="<%= files["href"] %>">
80
- <path><%= files["full_path"] %></path>
81
- <dtm-modified><%= files["dtm_modified"] %></dtm-modified>
78
+ <% values[:files].each do |files| %>
79
+ <rd:File rd:name="<%= files[:short_name] %>" rd:id="<%= files[:href] %>">
80
+ <path><%= files[:full_path] %></path>
81
+ <dtm-modified><%= files[:dtm_modified] %></dtm-modified>
82
82
  } + CONTENTS_RDF + %{
83
83
  </rd:File>
84
- <% end # values["files"] %>
85
- <% values["classes"].each do |classes| %>
86
- <<%= values["classmod"] %> rd:name="<%= classes["full_name"] %>" rd:id="<%= classes["full_name"] %>">
84
+ <% end # values[:files] %>
85
+ <% values[:classes].each do |classes| %>
86
+ <<%= values[:classmod] %> rd:name="<%= classes[:full_name] %>" rd:id="<%= classes[:full_name] %>">
87
87
  <classmod-info>
88
- <% if classes["infiles"] then %>
88
+ <% if classes[:infiles] then %>
89
89
  <InFiles>
90
- <% classes["infiles"].each do |infiles| %>
90
+ <% classes[:infiles].each do |infiles| %>
91
91
  <infile>
92
- <File rd:name="<%= infiles["full_path"] %>"
93
- <% if infiles["full_path_url"] then %>
94
- rdf:about="<%= infiles["full_path_url"] %>"
92
+ <File rd:name="<%= infiles[:full_path] %>"
93
+ <% if infiles[:full_path_url] then %>
94
+ rdf:about="<%= infiles[:full_path_url] %>"
95
95
  <% end %>
96
96
  />
97
97
  </infile>
98
- <% end # classes["infiles"] %>
98
+ <% end # classes[:infiles] %>
99
99
  </InFiles>
100
100
  <% end %>
101
- <% if classes["parent"] then %>
102
- <superclass><%= href classes["par_url"], classes["parent"] %></superclass>
101
+ <% if classes[:parent] then %>
102
+ <superclass><%= href classes[:par_url], classes[:parent] %></superclass>
103
103
  <% end %>
104
104
  </classmod-info>
105
105
  } + CONTENTS_RDF + %{
106
- </<%= classes["classmod"] %>>
107
- <% end # values["classes"] %>
106
+ </<%= classes[:classmod] %>>
107
+ <% end # values[:classes] %>
108
108
  <!-- /RDoc -->
109
109
  </rdf:RDF>
110
110
  }
@@ -3,83 +3,83 @@ require 'rdoc/generator/xml'
3
3
  module RDoc::Generator::XML::XML
4
4
 
5
5
  CONTENTS_XML = <<-EOF
6
- <% if defined? classes and classes["description"] then %>
6
+ <% if defined? classes and classes[:description] then %>
7
7
  <description>
8
- <%= classes["description"] %>
8
+ <%= classes[:description] %>
9
9
  </description>
10
10
  <% end %>
11
11
  <contents>
12
- <% if defined? files and files["requires"] then %>
12
+ <% if defined? files and files[:requires] then %>
13
13
  <required-file-list>
14
- <% files["requires"].each do |requires| %>
15
- <required-file name="<%= requires["name"] %>"
16
- <% if requires["aref"] then %>
17
- href="<%= requires["aref"] %>"
14
+ <% files[:requires].each do |requires| %>
15
+ <required-file name="<%= requires[:name] %>"
16
+ <% if requires[:aref] then %>
17
+ href="<%= requires[:aref] %>"
18
18
  <% end %>
19
19
  />
20
- <% end %><%# files["requires"] %>
20
+ <% end %><%# files[:requires] %>
21
21
  </required-file-list>
22
22
  <% end %>
23
- <% if defined? classes and classes["sections"] then %>
24
- <% classes["sections"].each do |sections| %>
25
- <% if sections["constants"] then %>
23
+ <% if defined? classes and classes[:sections] then %>
24
+ <% classes[:sections].each do |sections| %>
25
+ <% if sections[:constants] then %>
26
26
  <constant-list>
27
- <% sections["constants"].each do |constant| %>
28
- <constant name="<%= constant["name"] %>">
29
- <% if constant["value"] then %>
30
- <value><%= constant["value"] %></value>
27
+ <% sections[:constants].each do |constant| %>
28
+ <constant name="<%= constant[:name] %>">
29
+ <% if constant[:value] then %>
30
+ <value><%= constant[:value] %></value>
31
31
  <% end %>
32
- <description><%= constant["a_desc"] %></description>
32
+ <description><%= constant[:a_desc] %></description>
33
33
  </constant>
34
- <% end %><%# sections["constants"] %>
34
+ <% end %><%# sections[:constants] %>
35
35
  </constant-list>
36
36
  <% end %>
37
- <% if sections["attributes"] then %>
37
+ <% if sections[:attributes] then %>
38
38
  <attribute-list>
39
- <% sections["attributes"].each do |attributes| %>
40
- <attribute name="<%= attributes["name"] %>">
41
- <% if attributes["rw"] then %>
42
- <attribute-rw><%= attributes["rw"] %></attribute-rw>
39
+ <% sections[:attributes].each do |attributes| %>
40
+ <attribute name="<%= attributes[:name] %>">
41
+ <% if attributes[:rw] then %>
42
+ <attribute-rw><%= attributes[:rw] %></attribute-rw>
43
43
  <% end %>
44
- <description><%= attributes["a_desc"] %></description>
44
+ <description><%= attributes[:a_desc] %></description>
45
45
  </attribute>
46
- <% end %><%# sections["attributes"] %>
46
+ <% end %><%# sections[:attributes] %>
47
47
  </attribute-list>
48
48
  <% end %>
49
- <% if sections["method_list"] then %>
49
+ <% if sections[:method_list] then %>
50
50
  <method-list>
51
- <% sections["method_list"].each do |method_list| %>
52
- <% if method_list["methods"] then %>
53
- <% method_list["methods"].each do |methods| %>
54
- <method name="<%= methods["name"] %>" type="<%= methods["type"] %>" category="<%= methods["category"] %>" id="<%= methods["aref"] %>">
55
- <parameters><%= methods["params"] %></parameters>
56
- <% if methods["m_desc"] then %>
51
+ <% sections[:method_list].each do |method_list| %>
52
+ <% if method_list[:methods] then %>
53
+ <% method_list[:methods].each do |methods| %>
54
+ <method name="<%= methods[:name] %>" type="<%= method_list[:type] %>" category="<%= method_list[:category] %>" id="<%= methods[:aref] %>">
55
+ <parameters><%= methods[:params] %></parameters>
56
+ <% if methods[:m_desc] then %>
57
57
  <description>
58
- <%= methods["m_desc"] %>
58
+ <%= methods[:m_desc] %>
59
59
  </description>
60
60
  <% end %>
61
- <% if methods["sourcecode"] then %>
61
+ <% if methods[:sourcecode] then %>
62
62
  <source-code-listing>
63
- <%= methods["sourcecode"] %>
63
+ <%= methods[:sourcecode] %>
64
64
  </source-code-listing>
65
65
  <% end %>
66
66
  </method>
67
- <% end %><%# method_list["methods"] %>
67
+ <% end %><%# method_list[:methods] %>
68
68
  <% end %>
69
- <% end %><%# sections["method_list"] %>
69
+ <% end %><%# sections[:method_list] %>
70
70
  </method-list>
71
71
  <% end %>
72
- <% end %><%# classes["sections"] %>
72
+ <% end %><%# classes[:sections] %>
73
73
  <% end %>
74
- <% if defined? classes and classes["includes"] then %>
74
+ <% if defined? classes and classes[:includes] then %>
75
75
  <included-module-list>
76
- <% classes["includes"].each do |includes| %>
77
- <included-module name="<%= includes["name"] %>"
78
- <% if includes["aref"] then %>
79
- href="<%= includes["aref"] %>"
76
+ <% classes[:includes].each do |includes| %>
77
+ <included-module name="<%= includes[:name] %>"
78
+ <% if includes[:aref] then %>
79
+ href="<%= includes[:aref] %>"
80
80
  <% end %>
81
81
  />
82
- <% end %><%# classes["includes"] %>
82
+ <% end %><%# classes[:includes] %>
83
83
  </included-module-list>
84
84
  <% end %>
85
85
  </contents>
@@ -88,34 +88,34 @@ module RDoc::Generator::XML::XML
88
88
  ONE_PAGE = %{<?xml version="1.0" encoding="utf-8"?>
89
89
  <rdoc>
90
90
  <file-list>
91
- <% values["files"].each do |files| %>
92
- <file name="<%= files["short_name"] %>" id="<%= files["href"] %>">
91
+ <% values[:files].each do |files| %>
92
+ <file name="<%= files[:short_name] %>" id="<%= files[:href] %>">
93
93
  <file-info>
94
- <path><%= files["full_path"] %></path>
95
- <dtm-modified><%= files["dtm_modified"] %></dtm-modified>
94
+ <path><%= files[:full_path] %></path>
95
+ <dtm-modified><%= files[:dtm_modified] %></dtm-modified>
96
96
  </file-info>
97
97
  } + CONTENTS_XML + %{
98
98
  </file>
99
- <% end %><%# values["files"] %>
99
+ <% end %><%# values[:files] %>
100
100
  </file-list>
101
101
  <class-module-list>
102
- <% values["classes"].each do |classes| %>
103
- <<%= classes["classmod"] %> name="<%= classes["full_name"] %>" id="<%= classes["full_name"] %>">
102
+ <% values[:classes].each do |classes| %>
103
+ <<%= classes[:classmod] %> name="<%= classes[:full_name] %>" id="<%= classes[:full_name] %>">
104
104
  <classmod-info>
105
- <% if classes["infiles"] then %>
105
+ <% if classes[:infiles] then %>
106
106
  <infiles>
107
- <% classes["infiles"].each do |infiles| %>
108
- <infile><%= href infiles["full_path_url"], infiles["full_path"] %></infile>
109
- <% end %><%# classes["infiles"] %>
107
+ <% classes[:infiles].each do |infiles| %>
108
+ <infile><%= href infiles[:full_path_url], infiles[:full_path] %></infile>
109
+ <% end %><%# classes[:infiles] %>
110
110
  </infiles>
111
111
  <% end %>
112
- <% if classes["parent"] then %>
113
- <superclass><%= href classes["par_url"], classes["parent"] %></superclass>
112
+ <% if classes[:parent] then %>
113
+ <superclass><%= href classes[:par_url], classes[:parent] %></superclass>
114
114
  <% end %>
115
115
  </classmod-info>
116
116
  } + CONTENTS_XML + %{
117
- </<%= classes["classmod"] %>>
118
- <% end %><%# values["classes"] %>
117
+ </<%= classes[:classmod] %>>
118
+ <% end %><%# values[:classes] %>
119
119
  </class-module-list>
120
120
  </rdoc>
121
121
  }
@@ -62,7 +62,6 @@ module RDoc
62
62
  "rb_mGC" => "GC",
63
63
  "rb_mKernel" => "Kernel",
64
64
  "rb_mMath" => "Math",
65
- "rb_mPrecision" => "Precision",
66
65
  "rb_mProcess" => "Process"
67
66
  }
68
67
 
@@ -44,15 +44,16 @@ class RDoc::Markup::PreProcess
44
44
 
45
45
  def include_file(name, indent)
46
46
  if full_name = find_include_file(name) then
47
- content = File.open(full_name) {|f| f.read}
47
+ content = File.read full_name
48
+
48
49
  # strip leading '#'s, but only if all lines start with them
49
- if content =~ /^[^#]/
50
+ if content =~ /^[^#]/ then
50
51
  content.gsub(/^/, indent)
51
52
  else
52
53
  content.gsub(/^#?/, indent)
53
54
  end
54
55
  else
55
- $stderr.puts "Couldn't find file to include: '#{name}'"
56
+ $stderr.puts "Couldn't find file to include '#{name}' from #{@input_file_name}"
56
57
  ''
57
58
  end
58
59
  end
@@ -44,6 +44,9 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
44
44
  from = from.split "/"
45
45
  to = to.split "/"
46
46
 
47
+ from.delete '.'
48
+ to.delete '.'
49
+
47
50
  while from.size > 0 and to.size > 0 and from[0] == to[0] do
48
51
  from.shift
49
52
  to.shift
@@ -309,7 +312,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
309
312
 
310
313
  # convert -- to em-dash, (-- to en-dash)
311
314
  gsub(/---?/, '&#8212;'). #gsub(/--/, '&#8211;').
312
-
315
+
313
316
  # convert ... to elipsis (and make sure .... becomes .<elipsis>)
314
317
  gsub(/\.\.\.\./, '.&#8230;').gsub(/\.\.\./, '&#8230;').
315
318