rdoc 6.1.2 → 6.2.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.

@@ -494,7 +494,8 @@ class RDoc::Parser::RipperStateLex
494
494
  private def heredoc_end?(name, indent, tk)
495
495
  result = false
496
496
  if :on_heredoc_end == tk[:kind] then
497
- tk_name = (indent ? tk[:text].gsub(/^ *(.+)\n?$/, '\1') : tk[:text].gsub(/\n\z/, ''))
497
+ tk_name = tk[:text].chomp
498
+ tk_name.lstrip! if indent
498
499
  if name == tk_name
499
500
  result = true
500
501
  end
@@ -667,7 +667,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
667
667
  # Creates a comment with the correct format
668
668
 
669
669
  def new_comment comment
670
- c = RDoc::Comment.new comment, @top_level
670
+ c = RDoc::Comment.new comment, @top_level, :ruby
671
671
  c.format = @markup
672
672
  c
673
673
  end
@@ -1779,9 +1779,9 @@ class RDoc::Parser::Ruby < RDoc::Parser
1779
1779
  while tk and (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) do
1780
1780
  comment_body = retrieve_comment_body(tk)
1781
1781
  comment += comment_body
1782
- comment += "\n" unless "\n" == comment_body.chars.to_a.last
1782
+ comment << "\n" unless comment_body =~ /\n\z/
1783
1783
 
1784
- if comment_body.size > 1 && "\n" == comment_body.chars.to_a.last then
1784
+ if comment_body.size > 1 && comment_body =~ /\n\z/ then
1785
1785
  skip_tkspace_without_nl # leading spaces
1786
1786
  end
1787
1787
  tk = get_tk
@@ -24,7 +24,7 @@ require 'time'
24
24
  # rdoc.document argv
25
25
  #
26
26
  # Where +argv+ is an array of strings, each corresponding to an argument you'd
27
- # give rdoc on the command line. See <tt>rdoc --help<tt> for details.
27
+ # give rdoc on the command line. See <tt>rdoc --help</tt> for details.
28
28
 
29
29
  class RDoc::RDoc
30
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require 'rdoc/ri'
2
+ require 'rdoc/rdoc'
3
3
 
4
4
  ##
5
5
  # The directories where ri data lives. Paths can be enumerated via ::each, or
@@ -102,9 +102,9 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
102
102
  res.body = File.read asset_path
103
103
 
104
104
  res.content_type = case req.path
105
- when /css$/ then 'text/css'
106
- when /js$/ then 'application/javascript'
107
- else 'application/octet-stream'
105
+ when /\.css\z/ then 'text/css'
106
+ when /\.js\z/ then 'application/javascript'
107
+ else 'application/octet-stream'
108
108
  end
109
109
  end
110
110
 
@@ -112,7 +112,7 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
112
112
  # GET request entry point. Fills in +res+ for the path, etc. in +req+.
113
113
 
114
114
  def do_GET req, res
115
- req.path.sub!(/^#{Regexp.escape @mount_path}/o, '') if @mount_path
115
+ req.path.sub!(/\A#{Regexp.escape @mount_path}/, '') if @mount_path
116
116
 
117
117
  case req.path
118
118
  when '/' then
@@ -145,11 +145,14 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
145
145
  # +generator+ is used to create the page.
146
146
 
147
147
  def documentation_page store, generator, path, req, res
148
- name = path.sub(/.html$/, '').gsub '/', '::'
148
+ text_name = path.chomp '.html'
149
+ name = text_name.gsub '/', '::'
149
150
 
150
151
  if klass = store.find_class_or_module(name) then
151
152
  res.body = generator.generate_class klass
152
- elsif page = store.find_text_page(name.sub(/_([^_]*)$/, '.\1')) then
153
+ elsif page = store.find_text_page(name.sub(/_([^_]*)\z/, '.\1')) then
154
+ res.body = generator.generate_page page
155
+ elsif page = store.find_text_page(text_name.sub(/_([^_]*)\z/, '.\1')) then
153
156
  res.body = generator.generate_page page
154
157
  else
155
158
  not_found generator, req, res
@@ -416,7 +419,7 @@ version. If you're viewing Ruby's documentation, include the version of ruby.
416
419
  RDoc::Store.new RDoc::RI::Paths.system_dir, :system
417
420
  when 'site' then
418
421
  RDoc::Store.new RDoc::RI::Paths.site_dir, :site
419
- when /^extra-(\d+)$/ then
422
+ when /\Aextra-(\d+)\z/ then
420
423
  index = $1.to_i - 1
421
424
  ri_dir = installed_docs[index][4]
422
425
  RDoc::Store.new ri_dir, :extra
@@ -795,10 +795,8 @@ class RDoc::Store
795
795
 
796
796
  return if @dry_run
797
797
 
798
- marshal = Marshal.dump @cache
799
-
800
798
  File.open cache_path, 'wb' do |io|
801
- io.write marshal
799
+ Marshal.dump @cache, io
802
800
  end
803
801
  end
804
802
 
@@ -871,10 +869,8 @@ class RDoc::Store
871
869
 
872
870
  FileUtils.rm_f to_delete
873
871
 
874
- marshal = Marshal.dump klass
875
-
876
872
  File.open path, 'wb' do |io|
877
- io.write marshal
873
+ Marshal.dump klass, io
878
874
  end
879
875
  end
880
876
 
@@ -896,10 +892,8 @@ class RDoc::Store
896
892
 
897
893
  return if @dry_run
898
894
 
899
- marshal = Marshal.dump method
900
-
901
895
  File.open method_file(full_name, method.full_name), 'wb' do |io|
902
- io.write marshal
896
+ Marshal.dump method, io
903
897
  end
904
898
  end
905
899
 
@@ -918,10 +912,8 @@ class RDoc::Store
918
912
 
919
913
  return if @dry_run
920
914
 
921
- marshal = Marshal.dump page
922
-
923
915
  File.open path, 'wb' do |io|
924
- io.write marshal
916
+ Marshal.dump page, io
925
917
  end
926
918
  end
927
919
 
@@ -128,7 +128,7 @@ class RDoc::Task < Rake::TaskLib
128
128
  attr_accessor :template
129
129
 
130
130
  ##
131
- # Name of format generator (<tt>--format<tt>) used by rdoc. (defaults to
131
+ # Name of format generator (<tt>--format</tt>) used by rdoc. (defaults to
132
132
  # rdoc's default)
133
133
 
134
134
  attr_accessor :generator
@@ -10,6 +10,8 @@ require 'strscan'
10
10
 
11
11
  module RDoc::Text
12
12
 
13
+ attr_accessor :language
14
+
13
15
  ##
14
16
  # Maps markup formats to classes that can parse them. If the format is
15
17
  # unknown, "rdoc" format is used.
@@ -111,8 +113,12 @@ module RDoc::Text
111
113
  def normalize_comment text
112
114
  return text if text.empty?
113
115
 
114
- text = strip_stars text
115
- text = strip_hashes text
116
+ case language
117
+ when :ruby
118
+ text = strip_hashes text
119
+ when :c
120
+ text = strip_stars text
121
+ end
116
122
  text = expand_tabs text
117
123
  text = flush_left text
118
124
  text = strip_newlines text
@@ -74,11 +74,16 @@ module RDoc::TokenStream
74
74
  ##
75
75
  # Adds +tokens+ to the collected tokens
76
76
 
77
- def add_tokens(*tokens)
78
- tokens.flatten.each { |token| @token_stream << token }
77
+ def add_tokens(tokens)
78
+ @token_stream.concat(tokens)
79
79
  end
80
80
 
81
- alias add_token add_tokens
81
+ ##
82
+ # Adds one +token+ to the collected tokens
83
+
84
+ def add_token(token)
85
+ @token_stream.push(token)
86
+ end
82
87
 
83
88
  ##
84
89
  # Starts collecting tokens
@@ -242,19 +242,18 @@ class RDoc::TomDoc < RDoc::Markup::Parser
242
242
 
243
243
  @tokens << case
244
244
  when @s.scan(/\r?\n/) then
245
- token = [:NEWLINE, @s.matched, *token_pos(pos)]
246
- @line_pos = char_pos @s.pos
247
- @line += 1
245
+ token = [:NEWLINE, @s.matched, *pos]
246
+ @s.newline!
248
247
  token
249
248
  when @s.scan(/(Examples|Signature)$/) then
250
- @tokens << [:HEADER, 3, *token_pos(pos)]
249
+ @tokens << [:HEADER, 3, *pos]
251
250
 
252
- [:TEXT, @s[1], *token_pos(pos)]
251
+ [:TEXT, @s[1], *pos]
253
252
  when @s.scan(/([:\w][\w\[\]]*)[ ]+- /) then
254
- [:NOTE, @s[1], *token_pos(pos)]
253
+ [:NOTE, @s[1], *pos]
255
254
  else
256
255
  @s.scan(/.*/)
257
- [:TEXT, @s.matched.sub(/\r$/, ''), *token_pos(pos)]
256
+ [:TEXT, @s.matched.sub(/\r$/, ''), *pos]
258
257
  end
259
258
  end
260
259
 
@@ -3,6 +3,6 @@ module RDoc
3
3
  ##
4
4
  # RDoc version you are using
5
5
 
6
- VERSION = '6.1.2'
6
+ VERSION = '6.2.0'
7
7
 
8
8
  end
@@ -32,7 +32,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
32
32
  s.executables = ["rdoc", "ri"]
33
33
  s.require_paths = ["lib"]
34
34
  # for ruby core repository. It was generated by `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
35
- s.files = [".document", ".gitignore", ".travis.yml", "CONTRIBUTING.rdoc", "CVE-2013-0256.rdoc", "ExampleMarkdown.md", "ExampleRDoc.rdoc", "Gemfile", "History.rdoc", "LEGAL.rdoc", "LICENSE.rdoc", "README.rdoc", "RI.rdoc", "Rakefile", "TODO.rdoc", "appveyor.yml", "bin/console", "bin/setup", "exe/rdoc", "exe/ri", "lib/rdoc.rb", "lib/rdoc/alias.rb", "lib/rdoc/anon_class.rb", "lib/rdoc/any_method.rb", "lib/rdoc/attr.rb", "lib/rdoc/class_module.rb", "lib/rdoc/code_object.rb", "lib/rdoc/code_objects.rb", "lib/rdoc/comment.rb", "lib/rdoc/constant.rb", "lib/rdoc/context.rb", "lib/rdoc/context/section.rb", "lib/rdoc/cross_reference.rb", "lib/rdoc/encoding.rb", "lib/rdoc/erb_partial.rb", "lib/rdoc/erbio.rb", "lib/rdoc/extend.rb", "lib/rdoc/generator.rb", "lib/rdoc/generator/darkfish.rb", "lib/rdoc/generator/json_index.rb", "lib/rdoc/generator/markup.rb", "lib/rdoc/generator/pot.rb", "lib/rdoc/generator/pot/message_extractor.rb", "lib/rdoc/generator/pot/po.rb", "lib/rdoc/generator/pot/po_entry.rb", "lib/rdoc/generator/ri.rb", "lib/rdoc/generator/template/darkfish/.document", "lib/rdoc/generator/template/darkfish/_footer.rhtml", "lib/rdoc/generator/template/darkfish/_head.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml", "lib/rdoc/generator/template/darkfish/class.rhtml", "lib/rdoc/generator/template/darkfish/css/fonts.css", "lib/rdoc/generator/template/darkfish/css/rdoc.css", "lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf", "lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf", "lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf", "lib/rdoc/generator/template/darkfish/images/add.png", "lib/rdoc/generator/template/darkfish/images/arrow_up.png", "lib/rdoc/generator/template/darkfish/images/brick.png", "lib/rdoc/generator/template/darkfish/images/brick_link.png", "lib/rdoc/generator/template/darkfish/images/bug.png", "lib/rdoc/generator/template/darkfish/images/bullet_black.png", "lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png", "lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png", "lib/rdoc/generator/template/darkfish/images/date.png", "lib/rdoc/generator/template/darkfish/images/delete.png", "lib/rdoc/generator/template/darkfish/images/find.png", "lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif", "lib/rdoc/generator/template/darkfish/images/macFFBgHack.png", "lib/rdoc/generator/template/darkfish/images/package.png", "lib/rdoc/generator/template/darkfish/images/page_green.png", "lib/rdoc/generator/template/darkfish/images/page_white_text.png", "lib/rdoc/generator/template/darkfish/images/page_white_width.png", "lib/rdoc/generator/template/darkfish/images/plugin.png", "lib/rdoc/generator/template/darkfish/images/ruby.png", "lib/rdoc/generator/template/darkfish/images/tag_blue.png", "lib/rdoc/generator/template/darkfish/images/tag_green.png", "lib/rdoc/generator/template/darkfish/images/transparent.png", "lib/rdoc/generator/template/darkfish/images/wrench.png", "lib/rdoc/generator/template/darkfish/images/wrench_orange.png", "lib/rdoc/generator/template/darkfish/images/zoom.png", "lib/rdoc/generator/template/darkfish/index.rhtml", "lib/rdoc/generator/template/darkfish/js/darkfish.js", "lib/rdoc/generator/template/darkfish/js/search.js", "lib/rdoc/generator/template/darkfish/page.rhtml", "lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml", "lib/rdoc/generator/template/darkfish/servlet_root.rhtml", "lib/rdoc/generator/template/darkfish/table_of_contents.rhtml", "lib/rdoc/generator/template/json_index/.document", "lib/rdoc/generator/template/json_index/js/navigation.js", "lib/rdoc/generator/template/json_index/js/searcher.js", "lib/rdoc/ghost_method.rb", "lib/rdoc/i18n.rb", "lib/rdoc/i18n/locale.rb", "lib/rdoc/i18n/text.rb", "lib/rdoc/include.rb", "lib/rdoc/known_classes.rb", "lib/rdoc/markdown.kpeg", "lib/rdoc/markdown/entities.rb", "lib/rdoc/markdown/literals.kpeg", "lib/rdoc/markup.rb", "lib/rdoc/markup/attr_changer.rb", "lib/rdoc/markup/attr_span.rb", "lib/rdoc/markup/attribute_manager.rb", "lib/rdoc/markup/attributes.rb", "lib/rdoc/markup/blank_line.rb", "lib/rdoc/markup/block_quote.rb", "lib/rdoc/markup/document.rb", "lib/rdoc/markup/formatter.rb", "lib/rdoc/markup/formatter_test_case.rb", "lib/rdoc/markup/hard_break.rb", "lib/rdoc/markup/heading.rb", "lib/rdoc/markup/include.rb", "lib/rdoc/markup/indented_paragraph.rb", "lib/rdoc/markup/list.rb", "lib/rdoc/markup/list_item.rb", "lib/rdoc/markup/paragraph.rb", "lib/rdoc/markup/parser.rb", "lib/rdoc/markup/pre_process.rb", "lib/rdoc/markup/raw.rb", "lib/rdoc/markup/regexp_handling.rb", "lib/rdoc/markup/rule.rb", "lib/rdoc/markup/text_formatter_test_case.rb", "lib/rdoc/markup/to_ansi.rb", "lib/rdoc/markup/to_bs.rb", "lib/rdoc/markup/to_html.rb", "lib/rdoc/markup/to_html_crossref.rb", "lib/rdoc/markup/to_html_snippet.rb", "lib/rdoc/markup/to_joined_paragraph.rb", "lib/rdoc/markup/to_label.rb", "lib/rdoc/markup/to_markdown.rb", "lib/rdoc/markup/to_rdoc.rb", "lib/rdoc/markup/to_table_of_contents.rb", "lib/rdoc/markup/to_test.rb", "lib/rdoc/markup/to_tt_only.rb", "lib/rdoc/markup/verbatim.rb", "lib/rdoc/meta_method.rb", "lib/rdoc/method_attr.rb", "lib/rdoc/mixin.rb", "lib/rdoc/normal_class.rb", "lib/rdoc/normal_module.rb", "lib/rdoc/options.rb", "lib/rdoc/parser.rb", "lib/rdoc/parser/c.rb", "lib/rdoc/parser/changelog.rb", "lib/rdoc/parser/markdown.rb", "lib/rdoc/parser/rd.rb", "lib/rdoc/parser/ripper_state_lex.rb", "lib/rdoc/parser/ruby.rb", "lib/rdoc/parser/ruby_tools.rb", "lib/rdoc/parser/simple.rb", "lib/rdoc/parser/text.rb", "lib/rdoc/rd.rb", "lib/rdoc/rd/block_parser.ry", "lib/rdoc/rd/inline.rb", "lib/rdoc/rd/inline_parser.ry", "lib/rdoc/rdoc.rb", "lib/rdoc/require.rb", "lib/rdoc/ri.rb", "lib/rdoc/ri/driver.rb", "lib/rdoc/ri/formatter.rb", "lib/rdoc/ri/paths.rb", "lib/rdoc/ri/store.rb", "lib/rdoc/ri/task.rb", "lib/rdoc/rubygems_hook.rb", "lib/rdoc/servlet.rb", "lib/rdoc/single_class.rb", "lib/rdoc/stats.rb", "lib/rdoc/stats/normal.rb", "lib/rdoc/stats/quiet.rb", "lib/rdoc/stats/verbose.rb", "lib/rdoc/store.rb", "lib/rdoc/task.rb", "lib/rdoc/text.rb", "lib/rdoc/token_stream.rb", "lib/rdoc/tom_doc.rb", "lib/rdoc/top_level.rb", "lib/rdoc/version.rb", "rdoc.gemspec"]
35
+ s.files = [".document", ".gitignore", "CONTRIBUTING.rdoc", "CVE-2013-0256.rdoc", "ExampleMarkdown.md", "ExampleRDoc.rdoc", "Gemfile", "History.rdoc", "LEGAL.rdoc", "LICENSE.rdoc", "README.rdoc", "RI.rdoc", "Rakefile", "TODO.rdoc", "bin/console", "bin/setup", "exe/rdoc", "exe/ri", "lib/rdoc.rb", "lib/rdoc/alias.rb", "lib/rdoc/anon_class.rb", "lib/rdoc/any_method.rb", "lib/rdoc/attr.rb", "lib/rdoc/class_module.rb", "lib/rdoc/code_object.rb", "lib/rdoc/code_objects.rb", "lib/rdoc/comment.rb", "lib/rdoc/constant.rb", "lib/rdoc/context.rb", "lib/rdoc/context/section.rb", "lib/rdoc/cross_reference.rb", "lib/rdoc/encoding.rb", "lib/rdoc/erb_partial.rb", "lib/rdoc/erbio.rb", "lib/rdoc/extend.rb", "lib/rdoc/generator.rb", "lib/rdoc/generator/darkfish.rb", "lib/rdoc/generator/json_index.rb", "lib/rdoc/generator/markup.rb", "lib/rdoc/generator/pot.rb", "lib/rdoc/generator/pot/message_extractor.rb", "lib/rdoc/generator/pot/po.rb", "lib/rdoc/generator/pot/po_entry.rb", "lib/rdoc/generator/ri.rb", "lib/rdoc/generator/template/darkfish/.document", "lib/rdoc/generator/template/darkfish/_footer.rhtml", "lib/rdoc/generator/template/darkfish/_head.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml", "lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml", "lib/rdoc/generator/template/darkfish/class.rhtml", "lib/rdoc/generator/template/darkfish/css/fonts.css", "lib/rdoc/generator/template/darkfish/css/rdoc.css", "lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf", "lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf", "lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf", "lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf", "lib/rdoc/generator/template/darkfish/images/add.png", "lib/rdoc/generator/template/darkfish/images/arrow_up.png", "lib/rdoc/generator/template/darkfish/images/brick.png", "lib/rdoc/generator/template/darkfish/images/brick_link.png", "lib/rdoc/generator/template/darkfish/images/bug.png", "lib/rdoc/generator/template/darkfish/images/bullet_black.png", "lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png", "lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png", "lib/rdoc/generator/template/darkfish/images/date.png", "lib/rdoc/generator/template/darkfish/images/delete.png", "lib/rdoc/generator/template/darkfish/images/find.png", "lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif", "lib/rdoc/generator/template/darkfish/images/macFFBgHack.png", "lib/rdoc/generator/template/darkfish/images/package.png", "lib/rdoc/generator/template/darkfish/images/page_green.png", "lib/rdoc/generator/template/darkfish/images/page_white_text.png", "lib/rdoc/generator/template/darkfish/images/page_white_width.png", "lib/rdoc/generator/template/darkfish/images/plugin.png", "lib/rdoc/generator/template/darkfish/images/ruby.png", "lib/rdoc/generator/template/darkfish/images/tag_blue.png", "lib/rdoc/generator/template/darkfish/images/tag_green.png", "lib/rdoc/generator/template/darkfish/images/transparent.png", "lib/rdoc/generator/template/darkfish/images/wrench.png", "lib/rdoc/generator/template/darkfish/images/wrench_orange.png", "lib/rdoc/generator/template/darkfish/images/zoom.png", "lib/rdoc/generator/template/darkfish/index.rhtml", "lib/rdoc/generator/template/darkfish/js/darkfish.js", "lib/rdoc/generator/template/darkfish/js/search.js", "lib/rdoc/generator/template/darkfish/page.rhtml", "lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml", "lib/rdoc/generator/template/darkfish/servlet_root.rhtml", "lib/rdoc/generator/template/darkfish/table_of_contents.rhtml", "lib/rdoc/generator/template/json_index/.document", "lib/rdoc/generator/template/json_index/js/navigation.js", "lib/rdoc/generator/template/json_index/js/searcher.js", "lib/rdoc/ghost_method.rb", "lib/rdoc/i18n.rb", "lib/rdoc/i18n/locale.rb", "lib/rdoc/i18n/text.rb", "lib/rdoc/include.rb", "lib/rdoc/known_classes.rb", "lib/rdoc/markdown.kpeg", "lib/rdoc/markdown/entities.rb", "lib/rdoc/markdown/literals.kpeg", "lib/rdoc/markup.rb", "lib/rdoc/markup/attr_changer.rb", "lib/rdoc/markup/attr_span.rb", "lib/rdoc/markup/attribute_manager.rb", "lib/rdoc/markup/attributes.rb", "lib/rdoc/markup/blank_line.rb", "lib/rdoc/markup/block_quote.rb", "lib/rdoc/markup/document.rb", "lib/rdoc/markup/formatter.rb", "lib/rdoc/markup/hard_break.rb", "lib/rdoc/markup/heading.rb", "lib/rdoc/markup/include.rb", "lib/rdoc/markup/indented_paragraph.rb", "lib/rdoc/markup/list.rb", "lib/rdoc/markup/list_item.rb", "lib/rdoc/markup/paragraph.rb", "lib/rdoc/markup/parser.rb", "lib/rdoc/markup/pre_process.rb", "lib/rdoc/markup/raw.rb", "lib/rdoc/markup/regexp_handling.rb", "lib/rdoc/markup/rule.rb", "lib/rdoc/markup/to_ansi.rb", "lib/rdoc/markup/to_bs.rb", "lib/rdoc/markup/to_html.rb", "lib/rdoc/markup/to_html_crossref.rb", "lib/rdoc/markup/to_html_snippet.rb", "lib/rdoc/markup/to_joined_paragraph.rb", "lib/rdoc/markup/to_label.rb", "lib/rdoc/markup/to_markdown.rb", "lib/rdoc/markup/to_rdoc.rb", "lib/rdoc/markup/to_table_of_contents.rb", "lib/rdoc/markup/to_test.rb", "lib/rdoc/markup/to_tt_only.rb", "lib/rdoc/markup/verbatim.rb", "lib/rdoc/meta_method.rb", "lib/rdoc/method_attr.rb", "lib/rdoc/mixin.rb", "lib/rdoc/normal_class.rb", "lib/rdoc/normal_module.rb", "lib/rdoc/options.rb", "lib/rdoc/parser.rb", "lib/rdoc/parser/c.rb", "lib/rdoc/parser/changelog.rb", "lib/rdoc/parser/markdown.rb", "lib/rdoc/parser/rd.rb", "lib/rdoc/parser/ripper_state_lex.rb", "lib/rdoc/parser/ruby.rb", "lib/rdoc/parser/ruby_tools.rb", "lib/rdoc/parser/simple.rb", "lib/rdoc/parser/text.rb", "lib/rdoc/rd.rb", "lib/rdoc/rd/block_parser.ry", "lib/rdoc/rd/inline.rb", "lib/rdoc/rd/inline_parser.ry", "lib/rdoc/rdoc.rb", "lib/rdoc/require.rb", "lib/rdoc/ri.rb", "lib/rdoc/ri/driver.rb", "lib/rdoc/ri/formatter.rb", "lib/rdoc/ri/paths.rb", "lib/rdoc/ri/store.rb", "lib/rdoc/ri/task.rb", "lib/rdoc/rubygems_hook.rb", "lib/rdoc/servlet.rb", "lib/rdoc/single_class.rb", "lib/rdoc/stats.rb", "lib/rdoc/stats/normal.rb", "lib/rdoc/stats/quiet.rb", "lib/rdoc/stats/verbose.rb", "lib/rdoc/store.rb", "lib/rdoc/task.rb", "lib/rdoc/text.rb", "lib/rdoc/token_stream.rb", "lib/rdoc/tom_doc.rb", "lib/rdoc/top_level.rb", "lib/rdoc/version.rb", "rdoc.gemspec"]
36
36
  # files from .gitignore
37
37
  s.files << "lib/rdoc/rd/block_parser.rb" << "lib/rdoc/rd/inline_parser.rb" << "lib/rdoc/markdown.rb" << "lib/rdoc/markdown/literals.rb"
38
38
 
@@ -53,10 +53,4 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
53
53
  s.required_ruby_version = Gem::Requirement.new(">= 2.2.2")
54
54
  s.rubygems_version = "2.5.2"
55
55
  s.required_rubygems_version = Gem::Requirement.new(">= 2.2")
56
-
57
- s.add_development_dependency("rake")
58
- s.add_development_dependency("racc", "> 1.4.10")
59
- s.add_development_dependency("kpeg")
60
- s.add_development_dependency("minitest", "~> 5")
61
- s.add_development_dependency("rubocop")
62
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.2
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -15,77 +15,7 @@ autorequire:
15
15
  bindir: exe
16
16
  cert_chain: []
17
17
  date: 2019-08-28 00:00:00.000000000 Z
18
- dependencies:
19
- - !ruby/object:Gem::Dependency
20
- name: rake
21
- requirement: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: '0'
26
- type: :development
27
- prerelease: false
28
- version_requirements: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- - !ruby/object:Gem::Dependency
34
- name: racc
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">"
38
- - !ruby/object:Gem::Version
39
- version: 1.4.10
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">"
45
- - !ruby/object:Gem::Version
46
- version: 1.4.10
47
- - !ruby/object:Gem::Dependency
48
- name: kpeg
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- - !ruby/object:Gem::Dependency
62
- name: minitest
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '5'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '5'
75
- - !ruby/object:Gem::Dependency
76
- name: rubocop
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
18
+ dependencies: []
89
19
  description: |
90
20
  RDoc produces HTML and command-line documentation for Ruby projects.
91
21
  RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
@@ -115,7 +45,6 @@ extra_rdoc_files:
115
45
  files:
116
46
  - ".document"
117
47
  - ".gitignore"
118
- - ".travis.yml"
119
48
  - CONTRIBUTING.rdoc
120
49
  - CVE-2013-0256.rdoc
121
50
  - ExampleMarkdown.md
@@ -128,7 +57,6 @@ files:
128
57
  - RI.rdoc
129
58
  - Rakefile
130
59
  - TODO.rdoc
131
- - appveyor.yml
132
60
  - bin/console
133
61
  - bin/setup
134
62
  - exe/rdoc
@@ -239,7 +167,6 @@ files:
239
167
  - lib/rdoc/markup/block_quote.rb
240
168
  - lib/rdoc/markup/document.rb
241
169
  - lib/rdoc/markup/formatter.rb
242
- - lib/rdoc/markup/formatter_test_case.rb
243
170
  - lib/rdoc/markup/hard_break.rb
244
171
  - lib/rdoc/markup/heading.rb
245
172
  - lib/rdoc/markup/include.rb
@@ -252,7 +179,6 @@ files:
252
179
  - lib/rdoc/markup/raw.rb
253
180
  - lib/rdoc/markup/regexp_handling.rb
254
181
  - lib/rdoc/markup/rule.rb
255
- - lib/rdoc/markup/text_formatter_test_case.rb
256
182
  - lib/rdoc/markup/to_ansi.rb
257
183
  - lib/rdoc/markup/to_bs.rb
258
184
  - lib/rdoc/markup/to_html.rb
@@ -1,21 +0,0 @@
1
- ---
2
- before_install:
3
- - gem update --system
4
- - gem update bundler
5
- language: ruby
6
- rvm:
7
- - 2.3.8
8
- - 2.4.5
9
- - 2.5.3
10
- - ruby-head
11
- - jruby-9.1.17.0
12
- - jruby-9.2.4.1
13
- env:
14
- global:
15
- NOBENCHMARK=1
16
- script: rake
17
- matrix:
18
- allow_failures:
19
- - rvm: ruby-head
20
- - rvm: jruby-9.1.17.0
21
- - rvm: jruby-9.2.4.1
@@ -1,36 +0,0 @@
1
- ---
2
- init:
3
- # Set UTF-8 to use Unicode property because the defualt encoding on AppVeyor is Encoding::IBM437
4
- - set RUBYOPT=-EUTF-8
5
- # To avoid duplicated executables in PATH, see https://github.com/ruby/spec/pull/468
6
- - set PATH=C:\ruby%RUBY_VERSION%\bin;C:\msys64\usr\bin;C:\Program Files\7-Zip;C:\Program Files\AppVeyor\BuildAgent;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Program Files;C:\Windows
7
- # Loads trunk build and updates MSYS2 / MinGW to most recent gcc compiler
8
- - if %ruby_version%==_trunk (
9
- appveyor DownloadFile %APPVEYOR_URL%/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z -FileName C:\ruby_trunk.7z &
10
- 7z x C:\ruby_trunk.7z -oC:\ruby_trunk)
11
-
12
- install:
13
- - bundle install
14
-
15
- build: off
16
-
17
- test_script:
18
- - rake
19
-
20
- on_finish:
21
- - ruby -v
22
-
23
- deploy: off
24
-
25
- environment:
26
- NOBENCHMARK: 1
27
- matrix:
28
- - ruby_version: 22
29
- - ruby_version: 22-x64
30
- - ruby_version: 23
31
- - ruby_version: 23-x64
32
- - ruby_version: 24
33
- - ruby_version: 24-x64
34
- - ruby_version: 25
35
- - ruby_version: 25-x64
36
- - ruby_version: _trunk
@@ -1,764 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'minitest/unit'
3
-
4
- ##
5
- # Test case for creating new RDoc::Markup formatters. See
6
- # test/test_rdoc_markup_to_*.rb for examples.
7
- #
8
- # This test case adds a variety of tests to your subclass when
9
- # #add_visitor_tests is called. Most tests set up a scenario then call a
10
- # method you will provide to perform the assertion on the output.
11
- #
12
- # Your subclass must instantiate a visitor and assign it to <tt>@to</tt>.
13
- #
14
- # For example, test_accept_blank_line sets up a RDoc::Markup::BlockLine then
15
- # calls accept_blank_line on your visitor. You are responsible for asserting
16
- # that the output is correct.
17
- #
18
- # Example:
19
- #
20
- # class TestRDocMarkupToNewFormat < RDoc::Markup::FormatterTestCase
21
- #
22
- # add_visitor_tests
23
- #
24
- # def setup
25
- # super
26
- #
27
- # @to = RDoc::Markup::ToNewFormat.new
28
- # end
29
- #
30
- # def accept_blank_line
31
- # assert_equal :junk, @to.res.join
32
- # end
33
- #
34
- # # ...
35
- #
36
- # end
37
-
38
- class RDoc::Markup::FormatterTestCase < RDoc::TestCase
39
-
40
- ##
41
- # Call #setup when inheriting from this test case.
42
- #
43
- # Provides the following instance variables:
44
- #
45
- # +@m+:: RDoc::Markup.new
46
- # +@RM+:: RDoc::Markup # to reduce typing
47
- # +@bullet_list+:: @RM::List.new :BULLET, # ...
48
- # +@label_list+:: @RM::List.new :LABEL, # ...
49
- # +@lalpha_list+:: @RM::List.new :LALPHA, # ...
50
- # +@note_list+:: @RM::List.new :NOTE, # ...
51
- # +@number_list+:: @RM::List.new :NUMBER, # ...
52
- # +@ualpha_list+:: @RM::List.new :UALPHA, # ...
53
-
54
- def setup
55
- super
56
-
57
- @options = RDoc::Options.new
58
-
59
- @m = @RM.new
60
-
61
- @bullet_list = @RM::List.new(:BULLET,
62
- @RM::ListItem.new(nil, @RM::Paragraph.new('l1')),
63
- @RM::ListItem.new(nil, @RM::Paragraph.new('l2')))
64
-
65
- @label_list = @RM::List.new(:LABEL,
66
- @RM::ListItem.new('cat', @RM::Paragraph.new('cats are cool')),
67
- @RM::ListItem.new('dog', @RM::Paragraph.new('dogs are cool too')))
68
-
69
- @lalpha_list = @RM::List.new(:LALPHA,
70
- @RM::ListItem.new(nil, @RM::Paragraph.new('l1')),
71
- @RM::ListItem.new(nil, @RM::Paragraph.new('l2')))
72
-
73
- @note_list = @RM::List.new(:NOTE,
74
- @RM::ListItem.new('cat', @RM::Paragraph.new('cats are cool')),
75
- @RM::ListItem.new('dog', @RM::Paragraph.new('dogs are cool too')))
76
-
77
- @number_list = @RM::List.new(:NUMBER,
78
- @RM::ListItem.new(nil, @RM::Paragraph.new('l1')),
79
- @RM::ListItem.new(nil, @RM::Paragraph.new('l2')))
80
-
81
- @ualpha_list = @RM::List.new(:UALPHA,
82
- @RM::ListItem.new(nil, @RM::Paragraph.new('l1')),
83
- @RM::ListItem.new(nil, @RM::Paragraph.new('l2')))
84
- end
85
-
86
- ##
87
- # Call to add the visitor tests to your test case
88
-
89
- def self.add_visitor_tests
90
- class_eval do
91
-
92
- ##
93
- # Calls start_accepting which needs to verify startup state
94
-
95
- def test_start_accepting
96
- @to.start_accepting
97
-
98
- start_accepting
99
- end
100
-
101
- ##
102
- # Calls end_accepting on your test case which needs to call
103
- # <tt>@to.end_accepting</tt> and verify document generation
104
-
105
- def test_end_accepting
106
- @to.start_accepting
107
- @to.res << 'hi'
108
-
109
- end_accepting
110
- end
111
-
112
- ##
113
- # Calls accept_blank_line
114
-
115
- def test_accept_blank_line
116
- @to.start_accepting
117
-
118
- @to.accept_blank_line @RM::BlankLine.new
119
-
120
- accept_blank_line
121
- end
122
-
123
- ##
124
- # Calls accept_block_quote
125
-
126
- def test_accept_block_quote
127
- @to.start_accepting
128
-
129
- @to.accept_block_quote block para 'quote'
130
-
131
- accept_block_quote
132
- end
133
- ##
134
- # Test case that calls <tt>@to.accept_document</tt>
135
-
136
- def test_accept_document
137
- @to.start_accepting
138
- @to.accept_document @RM::Document.new @RM::Paragraph.new 'hello'
139
-
140
- accept_document
141
- end
142
-
143
- ##
144
- # Calls accept_heading with a level 5 RDoc::Markup::Heading
145
-
146
- def test_accept_heading
147
- @to.start_accepting
148
-
149
- @to.accept_heading @RM::Heading.new(5, 'Hello')
150
-
151
- accept_heading
152
- end
153
-
154
- ##
155
- # Calls accept_heading_1 with a level 1 RDoc::Markup::Heading
156
-
157
- def test_accept_heading_1
158
- @to.start_accepting
159
-
160
- @to.accept_heading @RM::Heading.new(1, 'Hello')
161
-
162
- accept_heading_1
163
- end
164
-
165
- ##
166
- # Calls accept_heading_2 with a level 2 RDoc::Markup::Heading
167
-
168
- def test_accept_heading_2
169
- @to.start_accepting
170
-
171
- @to.accept_heading @RM::Heading.new(2, 'Hello')
172
-
173
- accept_heading_2
174
- end
175
-
176
- ##
177
- # Calls accept_heading_3 with a level 3 RDoc::Markup::Heading
178
-
179
- def test_accept_heading_3
180
- @to.start_accepting
181
-
182
- @to.accept_heading @RM::Heading.new(3, 'Hello')
183
-
184
- accept_heading_3
185
- end
186
-
187
- ##
188
- # Calls accept_heading_4 with a level 4 RDoc::Markup::Heading
189
-
190
- def test_accept_heading_4
191
- @to.start_accepting
192
-
193
- @to.accept_heading @RM::Heading.new(4, 'Hello')
194
-
195
- accept_heading_4
196
- end
197
-
198
- ##
199
- # Calls accept_heading_b with a bold level 1 RDoc::Markup::Heading
200
-
201
- def test_accept_heading_b
202
- @to.start_accepting
203
-
204
- @to.accept_heading @RM::Heading.new(1, '*Hello*')
205
-
206
- accept_heading_b
207
- end
208
-
209
- ##
210
- # Calls accept_heading_suppressed_crossref with a level 1
211
- # RDoc::Markup::Heading containing a suppressed crossref
212
-
213
- def test_accept_heading_suppressed_crossref # HACK to_html_crossref test
214
- @to.start_accepting
215
-
216
- @to.accept_heading @RM::Heading.new(1, '\\Hello')
217
-
218
- accept_heading_suppressed_crossref
219
- end
220
-
221
- ##
222
- # Calls accept_paragraph
223
-
224
- def test_accept_paragraph
225
- @to.start_accepting
226
-
227
- @to.accept_paragraph @RM::Paragraph.new('hi')
228
-
229
- accept_paragraph
230
- end
231
-
232
- ##
233
- # Calls accept_paragraph_b with a RDoc::Markup::Paragraph containing
234
- # bold words
235
-
236
- def test_accept_paragraph_b
237
- @to.start_accepting
238
-
239
- @to.accept_paragraph @RM::Paragraph.new('reg <b>bold words</b> reg')
240
-
241
- accept_paragraph_b
242
- end
243
-
244
- ##
245
- # Calls accept_paragraph_br with a RDoc::Markup::Paragraph containing
246
- # a \<br>
247
-
248
- def test_accept_paragraph_br
249
- @to.start_accepting
250
-
251
- @to.accept_paragraph para 'one<br>two'
252
-
253
- accept_paragraph_br
254
- end
255
-
256
- ##
257
- # Calls accept_paragraph with a Paragraph containing a hard break
258
-
259
- def test_accept_paragraph_break
260
- @to.start_accepting
261
-
262
- @to.accept_paragraph para('hello', hard_break, 'world')
263
-
264
- accept_paragraph_break
265
- end
266
-
267
- ##
268
- # Calls accept_paragraph_i with a RDoc::Markup::Paragraph containing
269
- # emphasized words
270
-
271
- def test_accept_paragraph_i
272
- @to.start_accepting
273
-
274
- @to.accept_paragraph @RM::Paragraph.new('reg <em>italic words</em> reg')
275
-
276
- accept_paragraph_i
277
- end
278
-
279
- ##
280
- # Calls accept_paragraph_plus with a RDoc::Markup::Paragraph containing
281
- # teletype words
282
-
283
- def test_accept_paragraph_plus
284
- @to.start_accepting
285
-
286
- @to.accept_paragraph @RM::Paragraph.new('reg +teletype+ reg')
287
-
288
- accept_paragraph_plus
289
- end
290
-
291
- ##
292
- # Calls accept_paragraph_star with a RDoc::Markup::Paragraph containing
293
- # bold words
294
-
295
- def test_accept_paragraph_star
296
- @to.start_accepting
297
-
298
- @to.accept_paragraph @RM::Paragraph.new('reg *bold* reg')
299
-
300
- accept_paragraph_star
301
- end
302
-
303
- ##
304
- # Calls accept_paragraph_underscore with a RDoc::Markup::Paragraph
305
- # containing emphasized words
306
-
307
- def test_accept_paragraph_underscore
308
- @to.start_accepting
309
-
310
- @to.accept_paragraph @RM::Paragraph.new('reg _italic_ reg')
311
-
312
- accept_paragraph_underscore
313
- end
314
-
315
- ##
316
- # Calls accept_verbatim with a RDoc::Markup::Verbatim
317
-
318
- def test_accept_verbatim
319
- @to.start_accepting
320
-
321
- @to.accept_verbatim @RM::Verbatim.new("hi\n", " world\n")
322
-
323
- accept_verbatim
324
- end
325
-
326
- ##
327
- # Calls accept_raw with a RDoc::Markup::Raw
328
-
329
- def test_accept_raw
330
- @to.start_accepting
331
-
332
- @to.accept_raw @RM::Raw.new("<table>",
333
- "<tr><th>Name<th>Count",
334
- "<tr><td>a<td>1",
335
- "<tr><td>b<td>2",
336
- "</table>")
337
-
338
- accept_raw
339
- end
340
-
341
- ##
342
- # Calls accept_rule with a RDoc::Markup::Rule
343
-
344
- def test_accept_rule
345
- @to.start_accepting
346
-
347
- @to.accept_rule @RM::Rule.new(4)
348
-
349
- accept_rule
350
- end
351
-
352
- ##
353
- # Calls accept_list_item_start_bullet
354
-
355
- def test_accept_list_item_start_bullet
356
- @to.start_accepting
357
-
358
- @to.accept_list_start @bullet_list
359
-
360
- @to.accept_list_item_start @bullet_list.items.first
361
-
362
- accept_list_item_start_bullet
363
- end
364
-
365
- ##
366
- # Calls accept_list_item_start_label
367
-
368
- def test_accept_list_item_start_label
369
- @to.start_accepting
370
-
371
- @to.accept_list_start @label_list
372
-
373
- @to.accept_list_item_start @label_list.items.first
374
-
375
- accept_list_item_start_label
376
- end
377
-
378
- ##
379
- # Calls accept_list_item_start_lalpha
380
-
381
- def test_accept_list_item_start_lalpha
382
- @to.start_accepting
383
-
384
- @to.accept_list_start @lalpha_list
385
-
386
- @to.accept_list_item_start @lalpha_list.items.first
387
-
388
- accept_list_item_start_lalpha
389
- end
390
-
391
- ##
392
- # Calls accept_list_item_start_note
393
-
394
- def test_accept_list_item_start_note
395
- @to.start_accepting
396
-
397
- @to.accept_list_start @note_list
398
-
399
- @to.accept_list_item_start @note_list.items.first
400
-
401
- accept_list_item_start_note
402
- end
403
-
404
- ##
405
- # Calls accept_list_item_start_note_2
406
-
407
- def test_accept_list_item_start_note_2
408
- list = list(:NOTE,
409
- item('<tt>teletype</tt>',
410
- para('teletype description')))
411
-
412
- @to.start_accepting
413
-
414
- list.accept @to
415
-
416
- @to.end_accepting
417
-
418
- accept_list_item_start_note_2
419
- end
420
-
421
- ##
422
- # Calls accept_list_item_start_note_multi_description
423
-
424
- def test_accept_list_item_start_note_multi_description
425
- list = list(:NOTE,
426
- item(%w[label],
427
- para('description one')),
428
- item(nil, para('description two')))
429
-
430
- @to.start_accepting
431
-
432
- list.accept @to
433
-
434
- @to.end_accepting
435
-
436
- accept_list_item_start_note_multi_description
437
- end
438
-
439
- ##
440
- # Calls accept_list_item_start_note_multi_label
441
-
442
- def test_accept_list_item_start_note_multi_label
443
- list = list(:NOTE,
444
- item(%w[one two],
445
- para('two headers')))
446
-
447
- @to.start_accepting
448
-
449
- list.accept @to
450
-
451
- @to.end_accepting
452
-
453
- accept_list_item_start_note_multi_label
454
- end
455
-
456
- ##
457
- # Calls accept_list_item_start_number
458
-
459
- def test_accept_list_item_start_number
460
- @to.start_accepting
461
-
462
- @to.accept_list_start @number_list
463
-
464
- @to.accept_list_item_start @number_list.items.first
465
-
466
- accept_list_item_start_number
467
- end
468
-
469
- ##
470
- # Calls accept_list_item_start_ualpha
471
-
472
- def test_accept_list_item_start_ualpha
473
- @to.start_accepting
474
-
475
- @to.accept_list_start @ualpha_list
476
-
477
- @to.accept_list_item_start @ualpha_list.items.first
478
-
479
- accept_list_item_start_ualpha
480
- end
481
-
482
- ##
483
- # Calls accept_list_item_end_bullet
484
-
485
- def test_accept_list_item_end_bullet
486
- @to.start_accepting
487
-
488
- @to.accept_list_start @bullet_list
489
-
490
- @to.accept_list_item_start @bullet_list.items.first
491
-
492
- @to.accept_list_item_end @bullet_list.items.first
493
-
494
- accept_list_item_end_bullet
495
- end
496
-
497
- ##
498
- # Calls accept_list_item_end_label
499
-
500
- def test_accept_list_item_end_label
501
- @to.start_accepting
502
-
503
- @to.accept_list_start @label_list
504
-
505
- @to.accept_list_item_start @label_list.items.first
506
-
507
- @to.accept_list_item_end @label_list.items.first
508
-
509
- accept_list_item_end_label
510
- end
511
-
512
- ##
513
- # Calls accept_list_item_end_lalpha
514
-
515
- def test_accept_list_item_end_lalpha
516
- @to.start_accepting
517
-
518
- @to.accept_list_start @lalpha_list
519
-
520
- @to.accept_list_item_start @lalpha_list.items.first
521
-
522
- @to.accept_list_item_end @lalpha_list.items.first
523
-
524
- accept_list_item_end_lalpha
525
- end
526
-
527
- ##
528
- # Calls accept_list_item_end_note
529
-
530
- def test_accept_list_item_end_note
531
- @to.start_accepting
532
-
533
- @to.accept_list_start @note_list
534
-
535
- @to.accept_list_item_start @note_list.items.first
536
-
537
- @to.accept_list_item_end @note_list.items.first
538
-
539
- accept_list_item_end_note
540
- end
541
-
542
- ##
543
- # Calls accept_list_item_end_number
544
-
545
- def test_accept_list_item_end_number
546
- @to.start_accepting
547
-
548
- @to.accept_list_start @number_list
549
-
550
- @to.accept_list_item_start @number_list.items.first
551
-
552
- @to.accept_list_item_end @number_list.items.first
553
-
554
- accept_list_item_end_number
555
- end
556
-
557
- ##
558
- # Calls accept_list_item_end_ualpha
559
-
560
- def test_accept_list_item_end_ualpha
561
- @to.start_accepting
562
-
563
- @to.accept_list_start @ualpha_list
564
-
565
- @to.accept_list_item_start @ualpha_list.items.first
566
-
567
- @to.accept_list_item_end @ualpha_list.items.first
568
-
569
- accept_list_item_end_ualpha
570
- end
571
-
572
- ##
573
- # Calls accept_list_start_bullet
574
-
575
- def test_accept_list_start_bullet
576
- @to.start_accepting
577
-
578
- @to.accept_list_start @bullet_list
579
-
580
- accept_list_start_bullet
581
- end
582
-
583
- ##
584
- # Calls accept_list_start_label
585
-
586
- def test_accept_list_start_label
587
- @to.start_accepting
588
-
589
- @to.accept_list_start @label_list
590
-
591
- accept_list_start_label
592
- end
593
-
594
- ##
595
- # Calls accept_list_start_lalpha
596
-
597
- def test_accept_list_start_lalpha
598
- @to.start_accepting
599
-
600
- @to.accept_list_start @lalpha_list
601
-
602
- accept_list_start_lalpha
603
- end
604
-
605
- ##
606
- # Calls accept_list_start_note
607
-
608
- def test_accept_list_start_note
609
- @to.start_accepting
610
-
611
- @to.accept_list_start @note_list
612
-
613
- accept_list_start_note
614
- end
615
-
616
- ##
617
- # Calls accept_list_start_number
618
-
619
- def test_accept_list_start_number
620
- @to.start_accepting
621
-
622
- @to.accept_list_start @number_list
623
-
624
- accept_list_start_number
625
- end
626
-
627
- ##
628
- # Calls accept_list_start_ualpha
629
-
630
- def test_accept_list_start_ualpha
631
- @to.start_accepting
632
-
633
- @to.accept_list_start @ualpha_list
634
-
635
- accept_list_start_ualpha
636
- end
637
-
638
- ##
639
- # Calls accept_list_end_bullet
640
-
641
- def test_accept_list_end_bullet
642
- @to.start_accepting
643
-
644
- @to.accept_list_start @bullet_list
645
-
646
- @to.accept_list_end @bullet_list
647
-
648
- accept_list_end_bullet
649
- end
650
-
651
- ##
652
- # Calls accept_list_end_label
653
-
654
- def test_accept_list_end_label
655
- @to.start_accepting
656
-
657
- @to.accept_list_start @label_list
658
-
659
- @to.accept_list_end @label_list
660
-
661
- accept_list_end_label
662
- end
663
-
664
- ##
665
- # Calls accept_list_end_lalpha
666
-
667
- def test_accept_list_end_lalpha
668
- @to.start_accepting
669
-
670
- @to.accept_list_start @lalpha_list
671
-
672
- @to.accept_list_end @lalpha_list
673
-
674
- accept_list_end_lalpha
675
- end
676
-
677
- ##
678
- # Calls accept_list_end_number
679
-
680
- def test_accept_list_end_number
681
- @to.start_accepting
682
-
683
- @to.accept_list_start @number_list
684
-
685
- @to.accept_list_end @number_list
686
-
687
- accept_list_end_number
688
- end
689
-
690
- ##
691
- # Calls accept_list_end_note
692
-
693
- def test_accept_list_end_note
694
- @to.start_accepting
695
-
696
- @to.accept_list_start @note_list
697
-
698
- @to.accept_list_end @note_list
699
-
700
- accept_list_end_note
701
- end
702
-
703
- ##
704
- # Calls accept_list_end_ualpha
705
-
706
- def test_accept_list_end_ualpha
707
- @to.start_accepting
708
-
709
- @to.accept_list_start @ualpha_list
710
-
711
- @to.accept_list_end @ualpha_list
712
-
713
- accept_list_end_ualpha
714
- end
715
-
716
- ##
717
- # Calls list_nested with a two-level list
718
-
719
- def test_list_nested
720
- doc = @RM::Document.new(
721
- @RM::List.new(:BULLET,
722
- @RM::ListItem.new(nil,
723
- @RM::Paragraph.new('l1'),
724
- @RM::List.new(:BULLET,
725
- @RM::ListItem.new(nil,
726
- @RM::Paragraph.new('l1.1')))),
727
- @RM::ListItem.new(nil,
728
- @RM::Paragraph.new('l2'))))
729
-
730
- doc.accept @to
731
-
732
- list_nested
733
- end
734
-
735
- ##
736
- # Calls list_verbatim with a list containing a verbatim block
737
-
738
- def test_list_verbatim # HACK overblown
739
- doc =
740
- doc(
741
- list(:BULLET,
742
- item(nil,
743
- para('list stuff'),
744
- blank_line,
745
- verb("* list\n",
746
- " with\n",
747
- "\n",
748
- " second\n",
749
- "\n",
750
- " 1. indented\n",
751
- " 2. numbered\n",
752
- "\n",
753
- " third\n",
754
- "\n",
755
- "* second\n"))))
756
-
757
- doc.accept @to
758
-
759
- list_verbatim
760
- end
761
- end
762
- end
763
-
764
- end