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.
- data.tar.gz.sig +2 -0
- data/.document +4 -0
- data/History.txt +35 -0
- data/Manifest.txt +36 -15
- data/README.txt +11 -27
- data/Rakefile +3 -0
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/cache.rb +32 -0
- data/lib/rdoc/code_objects.rb +121 -59
- data/lib/rdoc/generator.rb +196 -133
- data/lib/rdoc/generator/darkfish.rb +471 -0
- data/lib/rdoc/generator/html.rb +71 -60
- data/lib/rdoc/generator/html/html.rb +115 -115
- data/lib/rdoc/generator/html/one_page_html.rb +56 -56
- data/lib/rdoc/generator/ri.rb +2 -0
- data/lib/rdoc/generator/template/darkfish/.document +0 -0
- data/lib/rdoc/generator/template/darkfish/classpage.rhtml +302 -0
- data/lib/rdoc/generator/template/darkfish/filepage.rhtml +114 -0
- data/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- data/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- data/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- data/lib/rdoc/generator/template/darkfish/index.rhtml +57 -0
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
- data/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
- data/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
- data/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
- data/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
- data/lib/rdoc/generator/xml.rb +19 -12
- data/lib/rdoc/generator/xml/rdf.rb +50 -50
- data/lib/rdoc/generator/xml/xml.rb +58 -58
- data/lib/rdoc/known_classes.rb +0 -1
- data/lib/rdoc/markup/preprocess.rb +4 -3
- data/lib/rdoc/markup/to_html.rb +4 -1
- data/lib/rdoc/markup/to_html_crossref.rb +28 -31
- data/lib/rdoc/options.rb +25 -20
- data/lib/rdoc/parser.rb +10 -2
- data/lib/rdoc/parser/c.rb +38 -29
- data/lib/rdoc/parser/f95.rb +32 -32
- data/lib/rdoc/parser/ruby.rb +5 -2
- data/lib/rdoc/parser/simple.rb +1 -0
- data/lib/rdoc/rdoc.rb +99 -47
- data/lib/rdoc/ri/cache.rb +6 -6
- data/lib/rdoc/ri/display.rb +22 -75
- data/lib/rdoc/ri/driver.rb +237 -78
- data/lib/rdoc/stats.rb +91 -28
- data/lib/rdoc/template.rb +6 -2
- data/test/test.ja.rdoc +8 -0
- data/test/test.ja.txt +8 -0
- data/test/test_attribute_manager.rb +9 -6
- data/test/test_rdoc_markup.rb +4 -2
- data/test/test_rdoc_markup_attribute_manager.rb +13 -3
- data/test/test_rdoc_markup_to_html.rb +18 -2
- data/test/test_rdoc_markup_to_html_crossref.rb +186 -249
- data/test/test_rdoc_parser.rb +17 -1
- data/test/test_rdoc_parser_c.rb +65 -10
- data/test/test_rdoc_parser_perl.rb +4 -2
- data/test/test_rdoc_parser_ruby.rb +6 -4
- data/test/test_rdoc_ri_attribute_formatter.rb +4 -2
- data/test/test_rdoc_ri_default_display.rb +8 -4
- data/test/test_rdoc_ri_driver.rb +4 -2
- data/test/test_rdoc_ri_formatter.rb +6 -4
- data/test/test_rdoc_ri_overstrike_formatter.rb +4 -2
- metadata +84 -33
- metadata.gz.sig +0 -0
- data/lib/rdoc/generator/chm.rb +0 -113
- data/lib/rdoc/generator/chm/chm.rb +0 -100
- data/lib/rdoc/generator/html/frameless.rb +0 -92
- data/lib/rdoc/generator/html/hefss.rb +0 -150
- data/lib/rdoc/generator/html/kilmer.rb +0 -151
- data/lib/rdoc/generator/html/kilmerfactory.rb +0 -427
- data/lib/rdoc/generator/texinfo.rb +0 -81
- data/lib/rdoc/generator/texinfo/class.texinfo.erb +0 -44
- data/lib/rdoc/generator/texinfo/file.texinfo.erb +0 -6
- data/lib/rdoc/generator/texinfo/method.texinfo.erb +0 -6
- data/lib/rdoc/generator/texinfo/texinfo.erb +0 -28
- data/test/rdoc_markup_to_html_crossref_reference.rb +0 -31
- data/test/test_rdoc_info_formatting.rb +0 -175
- data/test/test_rdoc_info_sections.rb +0 -136
data/lib/rdoc/generator/xml.rb
CHANGED
@@ -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,
|
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,
|
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
|
-
|
67
|
-
|
68
|
-
|
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 << {
|
112
|
+
res << { :href => f.path, :name => f.index_name }
|
106
113
|
end
|
107
114
|
end
|
108
115
|
|
109
116
|
return {
|
110
|
-
|
111
|
-
|
112
|
-
|
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[
|
6
|
+
<% if defined? classes and classes[:description] then %>
|
7
7
|
<description rd:parseType="Literal">
|
8
|
-
<%= classes[
|
8
|
+
<%= classes[:description] %>
|
9
9
|
</description>
|
10
10
|
<% end %>
|
11
11
|
|
12
|
-
<% if defined? files and files[
|
13
|
-
<% files[
|
14
|
-
<rd:required-file rd:name="<%= requires[
|
15
|
-
<% end # files[
|
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[
|
18
|
+
<% if defined? classes and classes[:includes] then %>
|
19
19
|
<IncludedModuleList>
|
20
|
-
<% classes[
|
21
|
-
<included-module rd:name="<%= includes[
|
22
|
-
<% end # 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[
|
27
|
-
<% classes[
|
28
|
-
<% if sections[
|
29
|
-
<% sections[
|
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[
|
32
|
-
<% if attributes[
|
33
|
-
<attribute-rw><%= attributes[
|
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[
|
35
|
+
<description rdf:parseType="Literal"><%= attributes[:a_desc] %></description>
|
36
36
|
</Attribute>
|
37
37
|
</contents>
|
38
|
-
<% end # sections[
|
38
|
+
<% end # sections[:attributes] %>
|
39
39
|
<% end %>
|
40
40
|
|
41
|
-
<% if sections[
|
42
|
-
<% sections[
|
43
|
-
<% if method_list[
|
44
|
-
<% method_list[
|
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[
|
47
|
-
rd:category="<%= methods[
|
48
|
-
<parameters><%= methods[
|
49
|
-
<% if methods[
|
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[
|
51
|
+
<%= methods[:m_desc] %>
|
52
52
|
</description>
|
53
53
|
<% end %>
|
54
|
-
<% if methods[
|
54
|
+
<% if methods[:sourcecode] then %>
|
55
55
|
<source-code-listing rdf:parseType="Literal">
|
56
|
-
<%= methods[
|
56
|
+
<%= methods[:sourcecode] %>
|
57
57
|
</source-code-listing>
|
58
58
|
<% end %>
|
59
59
|
</Method>
|
60
60
|
</contents>
|
61
|
-
<% end # method_list[
|
61
|
+
<% end # method_list[:methods] %>
|
62
62
|
<% end %>
|
63
|
-
<% end # sections[
|
63
|
+
<% end # sections[:method_list] %>
|
64
64
|
<% end %>
|
65
65
|
<!-- end method list -->
|
66
|
-
<% end # classes[
|
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[
|
79
|
-
<rd:File rd:name="<%= files[
|
80
|
-
<path><%= files[
|
81
|
-
<dtm-modified><%= files[
|
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[
|
85
|
-
<% values[
|
86
|
-
<<%= values[
|
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[
|
88
|
+
<% if classes[:infiles] then %>
|
89
89
|
<InFiles>
|
90
|
-
<% classes[
|
90
|
+
<% classes[:infiles].each do |infiles| %>
|
91
91
|
<infile>
|
92
|
-
<File rd:name="<%= infiles[
|
93
|
-
<% if infiles[
|
94
|
-
rdf:about="<%= infiles[
|
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[
|
98
|
+
<% end # classes[:infiles] %>
|
99
99
|
</InFiles>
|
100
100
|
<% end %>
|
101
|
-
<% if classes[
|
102
|
-
<superclass><%= href classes[
|
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[
|
107
|
-
<% end # values[
|
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[
|
6
|
+
<% if defined? classes and classes[:description] then %>
|
7
7
|
<description>
|
8
|
-
<%= classes[
|
8
|
+
<%= classes[:description] %>
|
9
9
|
</description>
|
10
10
|
<% end %>
|
11
11
|
<contents>
|
12
|
-
<% if defined? files and files[
|
12
|
+
<% if defined? files and files[:requires] then %>
|
13
13
|
<required-file-list>
|
14
|
-
<% files[
|
15
|
-
<required-file name="<%= requires[
|
16
|
-
<% if requires[
|
17
|
-
href="<%= requires[
|
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[
|
20
|
+
<% end %><%# files[:requires] %>
|
21
21
|
</required-file-list>
|
22
22
|
<% end %>
|
23
|
-
<% if defined? classes and classes[
|
24
|
-
<% classes[
|
25
|
-
<% if sections[
|
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[
|
28
|
-
<constant name="<%= constant[
|
29
|
-
<% if constant[
|
30
|
-
<value><%= constant[
|
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[
|
32
|
+
<description><%= constant[:a_desc] %></description>
|
33
33
|
</constant>
|
34
|
-
<% end %><%# sections[
|
34
|
+
<% end %><%# sections[:constants] %>
|
35
35
|
</constant-list>
|
36
36
|
<% end %>
|
37
|
-
<% if sections[
|
37
|
+
<% if sections[:attributes] then %>
|
38
38
|
<attribute-list>
|
39
|
-
<% sections[
|
40
|
-
<attribute name="<%= attributes[
|
41
|
-
<% if attributes[
|
42
|
-
<attribute-rw><%= attributes[
|
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[
|
44
|
+
<description><%= attributes[:a_desc] %></description>
|
45
45
|
</attribute>
|
46
|
-
<% end %><%# sections[
|
46
|
+
<% end %><%# sections[:attributes] %>
|
47
47
|
</attribute-list>
|
48
48
|
<% end %>
|
49
|
-
<% if sections[
|
49
|
+
<% if sections[:method_list] then %>
|
50
50
|
<method-list>
|
51
|
-
<% sections[
|
52
|
-
<% if method_list[
|
53
|
-
<% method_list[
|
54
|
-
<method name="<%= methods[
|
55
|
-
<parameters><%= methods[
|
56
|
-
<% if methods[
|
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[
|
58
|
+
<%= methods[:m_desc] %>
|
59
59
|
</description>
|
60
60
|
<% end %>
|
61
|
-
<% if methods[
|
61
|
+
<% if methods[:sourcecode] then %>
|
62
62
|
<source-code-listing>
|
63
|
-
<%= methods[
|
63
|
+
<%= methods[:sourcecode] %>
|
64
64
|
</source-code-listing>
|
65
65
|
<% end %>
|
66
66
|
</method>
|
67
|
-
<% end %><%# method_list[
|
67
|
+
<% end %><%# method_list[:methods] %>
|
68
68
|
<% end %>
|
69
|
-
<% end %><%# sections[
|
69
|
+
<% end %><%# sections[:method_list] %>
|
70
70
|
</method-list>
|
71
71
|
<% end %>
|
72
|
-
<% end %><%# classes[
|
72
|
+
<% end %><%# classes[:sections] %>
|
73
73
|
<% end %>
|
74
|
-
<% if defined? classes and classes[
|
74
|
+
<% if defined? classes and classes[:includes] then %>
|
75
75
|
<included-module-list>
|
76
|
-
<% classes[
|
77
|
-
<included-module name="<%= includes[
|
78
|
-
<% if includes[
|
79
|
-
href="<%= includes[
|
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[
|
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[
|
92
|
-
<file name="<%= files[
|
91
|
+
<% values[:files].each do |files| %>
|
92
|
+
<file name="<%= files[:short_name] %>" id="<%= files[:href] %>">
|
93
93
|
<file-info>
|
94
|
-
<path><%= files[
|
95
|
-
<dtm-modified><%= files[
|
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[
|
99
|
+
<% end %><%# values[:files] %>
|
100
100
|
</file-list>
|
101
101
|
<class-module-list>
|
102
|
-
<% values[
|
103
|
-
<<%= classes[
|
102
|
+
<% values[:classes].each do |classes| %>
|
103
|
+
<<%= classes[:classmod] %> name="<%= classes[:full_name] %>" id="<%= classes[:full_name] %>">
|
104
104
|
<classmod-info>
|
105
|
-
<% if classes[
|
105
|
+
<% if classes[:infiles] then %>
|
106
106
|
<infiles>
|
107
|
-
<% classes[
|
108
|
-
<infile><%= href infiles[
|
109
|
-
<% end %><%# classes[
|
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[
|
113
|
-
<superclass><%= href classes[
|
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[
|
118
|
-
<% end %><%# values[
|
117
|
+
</<%= classes[:classmod] %>>
|
118
|
+
<% end %><%# values[:classes] %>
|
119
119
|
</class-module-list>
|
120
120
|
</rdoc>
|
121
121
|
}
|
data/lib/rdoc/known_classes.rb
CHANGED
@@ -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.
|
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
|
56
|
+
$stderr.puts "Couldn't find file to include '#{name}' from #{@input_file_name}"
|
56
57
|
''
|
57
58
|
end
|
58
59
|
end
|
data/lib/rdoc/markup/to_html.rb
CHANGED
@@ -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(/---?/, '—'). #gsub(/--/, '–').
|
312
|
-
|
315
|
+
|
313
316
|
# convert ... to elipsis (and make sure .... becomes .<elipsis>)
|
314
317
|
gsub(/\.\.\.\./, '.…').gsub(/\.\.\./, '…').
|
315
318
|
|