rdoc 4.0.1 → 4.1.0.preview.3

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 (140) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.autotest +1 -3
  5. data/{DEVELOPERS.rdoc → CONTRIBUTING.rdoc} +28 -3
  6. data/ExampleMarkdown.md +37 -0
  7. data/ExampleRDoc.rdoc +208 -0
  8. data/History.rdoc +81 -0
  9. data/Manifest.txt +11 -2
  10. data/README.rdoc +5 -5
  11. data/Rakefile +34 -4
  12. data/lib/rdoc.rb +4 -3
  13. data/lib/rdoc/any_method.rb +48 -4
  14. data/lib/rdoc/class_module.rb +16 -2
  15. data/lib/rdoc/code_object.rb +85 -24
  16. data/lib/rdoc/comment.rb +0 -3
  17. data/lib/rdoc/constant.rb +9 -1
  18. data/lib/rdoc/context.rb +20 -2
  19. data/lib/rdoc/cross_reference.rb +1 -1
  20. data/lib/rdoc/extend.rb +4 -112
  21. data/lib/rdoc/generator/darkfish.rb +46 -7
  22. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +4 -4
  23. data/lib/rdoc/generator/template/darkfish/_head.rhtml +14 -8
  24. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +4 -3
  25. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +3 -3
  26. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +3 -4
  27. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +4 -3
  28. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +3 -4
  29. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +3 -3
  30. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +4 -4
  31. data/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +9 -5
  32. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
  33. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +4 -3
  34. data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +12 -7
  35. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +5 -4
  36. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +6 -7
  37. data/lib/rdoc/generator/template/darkfish/class.rhtml +36 -41
  38. data/lib/rdoc/generator/template/darkfish/fonts.css +167 -0
  39. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  40. data/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  41. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  42. data/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  43. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  44. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  45. data/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
  46. data/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  47. data/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
  48. data/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  49. data/lib/rdoc/generator/template/darkfish/index.rhtml +11 -7
  50. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +0 -15
  51. data/lib/rdoc/generator/template/darkfish/js/search.js +12 -4
  52. data/lib/rdoc/generator/template/darkfish/page.rhtml +9 -9
  53. data/lib/rdoc/generator/template/darkfish/rdoc.css +226 -241
  54. data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +5 -5
  55. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +13 -6
  56. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +17 -14
  57. data/lib/rdoc/include.rb +4 -114
  58. data/lib/rdoc/known_classes.rb +1 -0
  59. data/lib/rdoc/markdown.kpeg +126 -117
  60. data/lib/rdoc/markdown.rb +404 -389
  61. data/lib/rdoc/markdown/literals_1_8.kpeg +1 -1
  62. data/lib/rdoc/markdown/literals_1_8.rb +15 -12
  63. data/lib/rdoc/markdown/literals_1_9.kpeg +1 -1
  64. data/lib/rdoc/markdown/literals_1_9.rb +15 -12
  65. data/lib/rdoc/markup.rb +10 -13
  66. data/lib/rdoc/markup/attribute_manager.rb +3 -2
  67. data/lib/rdoc/markup/formatter.rb +3 -3
  68. data/lib/rdoc/markup/heading.rb +13 -0
  69. data/lib/rdoc/markup/parser.rb +10 -3
  70. data/lib/rdoc/markup/pre_process.rb +1 -1
  71. data/lib/rdoc/markup/to_html.rb +46 -31
  72. data/lib/rdoc/markup/to_html_crossref.rb +3 -0
  73. data/lib/rdoc/markup/to_joined_paragraph.rb +1 -1
  74. data/lib/rdoc/markup/to_markdown.rb +7 -5
  75. data/lib/rdoc/markup/verbatim.rb +1 -1
  76. data/lib/rdoc/method_attr.rb +13 -1
  77. data/lib/rdoc/mixin.rb +120 -0
  78. data/lib/rdoc/normal_class.rb +4 -0
  79. data/lib/rdoc/normal_module.rb +4 -0
  80. data/lib/rdoc/options.rb +42 -8
  81. data/lib/rdoc/parser.rb +4 -2
  82. data/lib/rdoc/parser/c.rb +13 -7
  83. data/lib/rdoc/parser/ruby.rb +683 -480
  84. data/lib/rdoc/rdoc.rb +4 -3
  85. data/lib/rdoc/ri/driver.rb +174 -103
  86. data/lib/rdoc/ri/paths.rb +6 -6
  87. data/lib/rdoc/ruby_lex.rb +125 -102
  88. data/lib/rdoc/ruby_token.rb +41 -40
  89. data/lib/rdoc/servlet.rb +16 -6
  90. data/lib/rdoc/stats.rb +61 -48
  91. data/lib/rdoc/store.rb +5 -3
  92. data/lib/rdoc/test_case.rb +39 -0
  93. data/lib/rdoc/tom_doc.rb +28 -4
  94. data/lib/rdoc/top_level.rb +2 -2
  95. data/test/test_rdoc_any_method.rb +104 -1
  96. data/test/test_rdoc_class_module.rb +9 -15
  97. data/test/test_rdoc_code_object.rb +133 -8
  98. data/test/test_rdoc_context.rb +17 -0
  99. data/test/test_rdoc_context_section.rb +0 -7
  100. data/test/test_rdoc_cross_reference.rb +4 -3
  101. data/test/test_rdoc_generator_darkfish.rb +61 -19
  102. data/test/test_rdoc_generator_json_index.rb +0 -11
  103. data/test/test_rdoc_generator_ri.rb +0 -8
  104. data/test/test_rdoc_markdown.rb +15 -12
  105. data/test/test_rdoc_markdown_test.rb +0 -7
  106. data/test/test_rdoc_markup_attribute_manager.rb +121 -0
  107. data/test/test_rdoc_markup_document.rb +0 -7
  108. data/test/test_rdoc_markup_formatter.rb +29 -3
  109. data/test/test_rdoc_markup_heading.rb +9 -0
  110. data/test/test_rdoc_markup_parser.rb +0 -7
  111. data/test/test_rdoc_markup_pre_process.rb +15 -3
  112. data/test/test_rdoc_markup_raw.rb +0 -7
  113. data/test/test_rdoc_markup_to_html.rb +50 -8
  114. data/test/test_rdoc_markup_to_html_crossref.rb +7 -0
  115. data/test/test_rdoc_markup_to_html_snippet.rb +4 -4
  116. data/test/test_rdoc_markup_to_markdown.rb +6 -0
  117. data/test/test_rdoc_method_attr.rb +8 -0
  118. data/test/test_rdoc_normal_class.rb +5 -0
  119. data/test/test_rdoc_normal_module.rb +5 -0
  120. data/test/test_rdoc_options.rb +61 -22
  121. data/test/test_rdoc_parser.rb +10 -0
  122. data/test/test_rdoc_parser_c.rb +17 -5
  123. data/test/test_rdoc_parser_changelog.rb +0 -7
  124. data/test/test_rdoc_parser_rd.rb +0 -7
  125. data/test/test_rdoc_parser_ruby.rb +305 -28
  126. data/test/test_rdoc_rd_block_parser.rb +0 -8
  127. data/test/test_rdoc_rd_inline_parser.rb +0 -1
  128. data/test/test_rdoc_rdoc.rb +27 -1
  129. data/test/test_rdoc_ri_driver.rb +19 -7
  130. data/test/test_rdoc_ruby_lex.rb +116 -9
  131. data/test/test_rdoc_rubygems_hook.rb +1 -1
  132. data/test/test_rdoc_servlet.rb +44 -6
  133. data/test/test_rdoc_stats.rb +161 -141
  134. data/test/test_rdoc_store.rb +11 -19
  135. data/test/test_rdoc_text.rb +0 -7
  136. data/test/test_rdoc_tom_doc.rb +44 -16
  137. data/test/xref_test_case.rb +2 -0
  138. metadata +28 -27
  139. metadata.gz.sig +0 -0
  140. data/test/test_attribute_manager.rb +0 -120
@@ -118,9 +118,6 @@ class RDoc::Comment
118
118
  seq.gsub!(/^\s*/, '')
119
119
  method.call_seq = seq
120
120
  end
121
- #elsif @text.sub!(/\A\/\*\s*call-seq:(.*?)\*\/\Z/, '') then
122
- # method.call_seq = $1.strip
123
- #end
124
121
 
125
122
  method
126
123
  end
@@ -63,7 +63,15 @@ class RDoc::Constant < RDoc::CodeObject
63
63
  # for a documented class or module.
64
64
 
65
65
  def documented?
66
- super or is_alias_for && is_alias_for.documented?
66
+ return true if super
67
+ return false unless @is_alias_for
68
+ case @is_alias_for
69
+ when String then
70
+ found = @store.find_class_or_module @is_alias_for
71
+ return false unless found
72
+ @is_alias_for = found
73
+ end
74
+ @is_alias_for.documented?
67
75
  end
68
76
 
69
77
  ##
@@ -167,6 +167,24 @@ class RDoc::Context < RDoc::CodeObject
167
167
  full_name <=> other.full_name
168
168
  end
169
169
 
170
+ ##
171
+ # Adds an item of type +klass+ with the given +name+ and +comment+ to the
172
+ # context.
173
+ #
174
+ # Currently only RDoc::Extend and RDoc::Include are supported.
175
+
176
+ def add klass, name, comment
177
+ if RDoc::Extend == klass then
178
+ ext = RDoc::Extend.new name, comment
179
+ add_extend ext
180
+ elsif RDoc::Include == klass then
181
+ incl = RDoc::Include.new name, comment
182
+ add_include incl
183
+ else
184
+ raise NotImplementedError, "adding a #{klass} is not implemented"
185
+ end
186
+ end
187
+
170
188
  ##
171
189
  # Adds +an_alias+ that is automatically resolved
172
190
 
@@ -1041,8 +1059,8 @@ class RDoc::Context < RDoc::CodeObject
1041
1059
  #--
1042
1060
  # TODO mark the visibility of attributes in the template (if not public?)
1043
1061
 
1044
- def remove_invisible(min_visibility)
1045
- return if min_visibility == :private
1062
+ def remove_invisible min_visibility
1063
+ return if [:private, :nodoc].include? min_visibility
1046
1064
  remove_invisible_in @method_list, min_visibility
1047
1065
  remove_invisible_in @attributes, min_visibility
1048
1066
  end
@@ -18,7 +18,7 @@ class RDoc::CrossReference
18
18
  #
19
19
  # See CLASS_REGEXP_STR
20
20
 
21
- METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===)(?:\([\w.+*/=<>-]*\))?'
21
+ METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>)(?:\([\w.+*/=<>-]*\))?'
22
22
 
23
23
  ##
24
24
  # Regular expressions matching text that should potentially have
@@ -1,117 +1,9 @@
1
1
  ##
2
- # A Module extension in a class with \#extend
2
+ # A Module extension to a class with \#extend
3
+ #
4
+ # RDoc::Extend.new 'Enumerable', 'comment ...'
3
5
 
4
- class RDoc::Extend < RDoc::CodeObject
5
-
6
- ##
7
- # Name of extension module
8
-
9
- attr_accessor :name
10
-
11
- ##
12
- # Creates a new Extend for +name+ with +comment+
13
-
14
- def initialize(name, comment)
15
- super()
16
- @name = name
17
- self.comment = comment
18
- @module = nil # cache for module if found
19
- end
20
-
21
- ##
22
- # Extends are sorted by name
23
-
24
- def <=> other
25
- return unless self.class === other
26
-
27
- name <=> other.name
28
- end
29
-
30
- def == other # :nodoc:
31
- self.class === other and @name == other.name
32
- end
33
-
34
- alias eql? ==
35
-
36
- ##
37
- # Full name based on #module
38
-
39
- def full_name
40
- m = self.module
41
- RDoc::ClassModule === m ? m.full_name : @name
42
- end
43
-
44
- def hash # :nodoc:
45
- [@name, self.module].hash
46
- end
47
-
48
- def inspect # :nodoc:
49
- "#<%s:0x%x %s.extend %s>" % [
50
- self.class,
51
- object_id,
52
- parent_name, @name,
53
- ]
54
- end
55
-
56
- ##
57
- # Attempts to locate the extend module object. Returns the name if not
58
- # known.
59
- #
60
- # The scoping rules of Ruby to resolve the name of an extension module are:
61
- # - first look into the children of the current context;
62
- # - if not found, look into the children of extension modules,
63
- # in reverse extend order;
64
- # - if still not found, go up the hierarchy of names.
65
- #
66
- # This method has <code>O(n!)</code> behavior when the module calling
67
- # extend is referencing nonexistent modules. Avoid calling #module until
68
- # after all the files are parsed. This behavior is due to ruby's constant
69
- # lookup behavior.
70
-
71
- def module
72
- return @module if @module
73
-
74
- # search the current context
75
- return @name unless parent
76
- full_name = parent.child_name(@name)
77
- @module = @store.modules_hash[full_name]
78
- return @module if @module
79
- return @name if @name =~ /^::/
80
-
81
- # search the includes before this one, in reverse order
82
- searched = parent.extends.take_while { |i| i != self }.reverse
83
- searched.each do |i|
84
- ext = i.module
85
- next if String === ext
86
- full_name = ext.child_name(@name)
87
- @module = @store.modules_hash[full_name]
88
- return @module if @module
89
- end
90
-
91
- # go up the hierarchy of names
92
- up = parent.parent
93
- while up
94
- full_name = up.child_name(@name)
95
- @module = @store.modules_hash[full_name]
96
- return @module if @module
97
- up = up.parent
98
- end
99
-
100
- @name
101
- end
102
-
103
- ##
104
- # Sets the store for this class or module and its contained code objects.
105
-
106
- def store= store
107
- super
108
-
109
- @file = @store.add_file @file.full_name if @file
110
- end
111
-
112
- def to_s # :nodoc:
113
- "extend #@name in: #{parent}"
114
- end
6
+ class RDoc::Extend < RDoc::Mixin
115
7
 
116
8
  end
117
9
 
@@ -57,6 +57,21 @@ class RDoc::Generator::Darkfish
57
57
 
58
58
  include ERB::Util
59
59
 
60
+ ##
61
+ # Stylesheets, fonts, etc. that are included in RDoc.
62
+
63
+ BUILTIN_STYLE_ITEMS = # :nodoc:
64
+ %w[
65
+ fonts.css
66
+ fonts/Lato-Light.ttf
67
+ fonts/Lato-LightItalic.ttf
68
+ fonts/Lato-Regular.ttf
69
+ fonts/Lato-RegularItalic.ttf
70
+ fonts/SourceCodePro-Bold.ttf
71
+ fonts/SourceCodePro-Regular.ttf
72
+ rdoc.css
73
+ ]
74
+
60
75
  ##
61
76
  # Path to this file's parent directory. Used to find templates and other
62
77
  # resources.
@@ -127,6 +142,11 @@ class RDoc::Generator::Darkfish
127
142
 
128
143
  attr_reader :store
129
144
 
145
+ ##
146
+ # The directory where the template files live
147
+
148
+ attr_reader :template_dir # :nodoc:
149
+
130
150
  ##
131
151
  # The output directory
132
152
 
@@ -195,7 +215,13 @@ class RDoc::Generator::Darkfish
195
215
  debug_msg "Copying static files"
196
216
  options = { :verbose => $DEBUG_RDOC, :noop => @dry_run }
197
217
 
198
- FileUtils.cp @template_dir + 'rdoc.css', '.', options
218
+ BUILTIN_STYLE_ITEMS.each do |item|
219
+ install_rdoc_static_file @template_dir + item, "./#{item}", options
220
+ end
221
+
222
+ @options.template_stylesheets.each do |stylesheet|
223
+ FileUtils.cp stylesheet, '.', options
224
+ end
199
225
 
200
226
  Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path|
201
227
  next if File.directory? path
@@ -203,11 +229,7 @@ class RDoc::Generator::Darkfish
203
229
 
204
230
  dst = Pathname.new(path).relative_path_from @template_dir
205
231
 
206
- # I suck at glob
207
- dst_dir = dst.dirname
208
- FileUtils.mkdir_p dst_dir, options unless File.exist? dst_dir
209
-
210
- FileUtils.cp @template_dir + path, dst, options
232
+ install_rdoc_static_file @template_dir + path, dst, options
211
233
  end
212
234
  end
213
235
 
@@ -447,7 +469,7 @@ class RDoc::Generator::Darkfish
447
469
  ##
448
470
  # Generates the 404 page for the RDoc servlet
449
471
 
450
- def generate_servlet_not_found path
472
+ def generate_servlet_not_found message
451
473
  setup
452
474
 
453
475
  template_file = @template_dir + 'servlet_not_found.rhtml'
@@ -530,6 +552,23 @@ class RDoc::Generator::Darkfish
530
552
  raise error
531
553
  end
532
554
 
555
+ def install_rdoc_static_file source, destination, options # :nodoc:
556
+ return unless source.exist?
557
+
558
+ begin
559
+ FileUtils.mkdir_p File.dirname(destination), options
560
+
561
+ begin
562
+ FileUtils.ln source, destination, options
563
+ rescue Errno::EEXIST
564
+ FileUtils.rm destination
565
+ retry
566
+ end
567
+ rescue
568
+ FileUtils.cp source, destination, options
569
+ end
570
+ end
571
+
533
572
  ##
534
573
  # Prepares for generation of output from the current directory
535
574
 
@@ -1,5 +1,5 @@
1
- <footer id="validator-badges">
2
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
3
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> <%= RDoc::VERSION %>.
4
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %>.
1
+ <footer id="validator-badges" role="contentinfo">
2
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
3
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> <%= RDoc::VERSION %>.
4
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
5
5
  </footer>
@@ -1,16 +1,22 @@
1
- <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type">
1
+ <meta charset="<%= @options.charset %>">
2
2
 
3
3
  <title><%= h @title %></title>
4
4
 
5
- <link type="text/css" media="screen" href="<%= asset_rel_prefix %>/rdoc.css" rel="stylesheet">
5
+ <link href="<%= asset_rel_prefix %>/fonts.css" rel="stylesheet">
6
+ <link href="<%= asset_rel_prefix %>/rdoc.css" rel="stylesheet">
7
+ <% if @options.template_stylesheets.flatten.any? then %>
8
+ <% @options.template_stylesheets.flatten.each do |stylesheet| %>
9
+ <link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
10
+ <% end %>
11
+ <% end %>
6
12
 
7
13
  <script type="text/javascript">
8
14
  var rdoc_rel_prefix = "<%= rel_prefix %>/";
9
15
  </script>
10
16
 
11
- <script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/jquery.js"></script>
12
- <script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/navigation.js"></script>
13
- <script type="text/javascript" charset="utf-8" src="<%= search_index_rel_prefix %>/js/search_index.js"></script>
14
- <script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/search.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/searcher.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/darkfish.js"></script>
17
+ <script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
18
+ <script src="<%= asset_rel_prefix %>/js/navigation.js"></script>
19
+ <script src="<%= search_index_rel_prefix %>/js/search_index.js"></script>
20
+ <script src="<%= asset_rel_prefix %>/js/search.js"></script>
21
+ <script src="<%= asset_rel_prefix %>/js/searcher.js"></script>
22
+ <script src="<%= asset_rel_prefix %>/js/darkfish.js"></script>
@@ -1,6 +1,7 @@
1
1
  <% if !svninfo.empty? then %>
2
- <nav id="file-svninfo-section" class="section">
3
- <h3 class="section-header">VCS Info</h3>
2
+ <div id="file-svninfo-section" class="nav-section">
3
+ <h3>VCS Info</h3>
4
+
4
5
  <div class="section-body">
5
6
  <dl class="svninfo">
6
7
  <dt>Rev
@@ -14,5 +15,5 @@
14
15
  <dd><%= svninfo[:committer] %>
15
16
  </dl>
16
17
  </div>
17
- </nav>
18
+ </div>
18
19
  <% end %>
@@ -1,9 +1,9 @@
1
- <nav id="classindex-section" class="section project-section">
2
- <h3 class="section-header">Class and Module Index</h3>
1
+ <div id="classindex-section" class="nav-section">
2
+ <h3>Class and Module Index</h3>
3
3
 
4
4
  <ul class="link-list">
5
5
  <% @modsort.each do |index_klass| %>
6
6
  <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a>
7
7
  <% end %>
8
8
  </ul>
9
- </nav>
9
+ </div>
@@ -1,7 +1,6 @@
1
1
  <% unless klass.extends.empty? then %>
2
- <!-- Extension Modules -->
3
- <nav id="extends-section" class="section">
4
- <h3 class="section-header">Extended With Modules</h3>
2
+ <div id="extends-section" class="nav-section">
3
+ <h3>Extended With Modules</h3>
5
4
 
6
5
  <ul class="link-list">
7
6
  <% klass.each_extend do |ext| %>
@@ -12,5 +11,5 @@
12
11
  <% end %>
13
12
  <% end %>
14
13
  </ul>
15
- </nav>
14
+ </div>
16
15
  <% end %>
@@ -1,8 +1,9 @@
1
- <nav id="file-list-section" class="section">
2
- <h3 class="section-header">Defined In</h3>
1
+ <div id="file-list-section" class="nav-section">
2
+ <h3>Defined In</h3>
3
+
3
4
  <ul>
4
5
  <% klass.in_files.each do |tl| %>
5
6
  <li><%= h tl.relative_name %>
6
7
  <% end %>
7
8
  </ul>
8
- </nav>
9
+ </div>
@@ -1,7 +1,6 @@
1
1
  <% unless klass.includes.empty? then %>
2
- <!-- Included Modules -->
3
- <nav id="includes-section" class="section">
4
- <h3 class="section-header">Included Modules</h3>
2
+ <div id="includes-section" class="nav-section">
3
+ <h3>Included Modules</h3>
5
4
 
6
5
  <ul class="link-list">
7
6
  <% klass.each_include do |inc| %>
@@ -12,5 +11,5 @@
12
11
  <% end %>
13
12
  <% end %>
14
13
  </ul>
15
- </nav>
14
+ </div>
16
15
  <% end %>
@@ -1,5 +1,5 @@
1
- <nav id="home-section" class="section">
2
- <h3 class="section-header">Documentation</h3>
1
+ <div id="home-section" class="nav-section">
2
+ <h3>Documentation</h3>
3
3
 
4
4
  <ul>
5
5
  <% installed.each do |name, href, exists, type, _| %>
@@ -12,4 +12,4 @@
12
12
  <% end %>
13
13
  <% end %>
14
14
  </ul>
15
- </nav>
15
+ </div>
@@ -1,12 +1,12 @@
1
1
  <% unless klass.method_list.empty? then %>
2
2
  <!-- Method Quickref -->
3
- <nav id="method-list-section" class="section">
4
- <h3 class="section-header">Methods</h3>
3
+ <div id="method-list-section" class="nav-section">
4
+ <h3>Methods</h3>
5
5
 
6
- <ul class="link-list">
6
+ <ul class="link-list" role="directory">
7
7
  <% klass.each_method do |meth| %>
8
8
  <li <% if meth.calls_super %>class="calls-super" <% end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name %></a>
9
9
  <% end %>
10
10
  </ul>
11
- </nav>
11
+ </div>
12
12
  <% end %>
@@ -1,7 +1,11 @@
1
- <nav id="home-section" class="section">
2
- <h3 class="section-header">
3
- <a href="<%= rel_prefix %>/index.html">Home</a>
1
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
2
+ <h2>
3
+ <a href="<%= rel_prefix %>/index.html" rel="home">Home</a>
4
+ </h2>
5
+
6
+ <div id="table-of-contents-navigation">
7
+ <a href="<%= rel_prefix %>/table_of_contents.html#pages">Pages</a>
4
8
  <a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a>
5
9
  <a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a>
6
- </h3>
7
- </nav>
10
+ </div>
11
+ </div>