From fcb0b1f503b392e446e8ee4b1033e1e7c0e7d0fe Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 14 Jan 2008 03:34:05 +0000 Subject: Renamespace lib/rdoc/markup from SM::SimpleMarkup to RDoc::Markup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/ri/descriptions.rb | 4 ++-- lib/rdoc/ri/display.rb | 2 +- lib/rdoc/ri/driver.rb | 8 ++++---- lib/rdoc/ri/formatter.rb | 46 ++++++++++++++++++++++----------------------- lib/rdoc/ri/reader.rb | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) (limited to 'lib/rdoc/ri') diff --git a/lib/rdoc/ri/descriptions.rb b/lib/rdoc/ri/descriptions.rb index c9b7c9ba77..643d01fea8 100644 --- a/lib/rdoc/ri/descriptions.rb +++ b/lib/rdoc/ri/descriptions.rb @@ -1,5 +1,5 @@ require 'yaml' -require 'rdoc/markup/simple_markup/fragments' +require 'rdoc/markup/fragments' require 'rdoc/ri' #-- @@ -91,7 +91,7 @@ class RDoc::RI::ModuleDescription < RDoc::RI::Description @comment = old.comment else unless old.comment.nil? or old.comment.empty? then - @comment << SM::Flow::RULE.new + @comment << RDoc::Markup::Flow::RULE.new @comment.concat old.comment end end diff --git a/lib/rdoc/ri/display.rb b/lib/rdoc/ri/display.rb index 21fd488bb3..1aa66b7ac5 100644 --- a/lib/rdoc/ri/display.rb +++ b/lib/rdoc/ri/display.rb @@ -26,7 +26,7 @@ end ## # A paging display module. Uses the RDoc::RI::Formatter class to do the actual -# presentation +# presentation. class RDoc::RI::DefaultDisplay diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index a1aa64e598..3b3c5fa9d8 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -6,8 +6,8 @@ require 'rdoc/ri/paths' require 'rdoc/ri/formatter' require 'rdoc/ri/display' require 'fileutils' -require 'rdoc/markup/simple_markup' -require 'rdoc/markup/simple_markup/to_flow' +require 'rdoc/markup' +require 'rdoc/markup/to_flow' class RDoc::RI::Driver @@ -222,7 +222,7 @@ Options may also be set in the 'RI' environment variable. return @class_cache if @class_cache newest = map_dirs('created.rid', :all) do |f| - File.mtime f if test ?f, f + File.mtime f if test ?f, f end.max up_to_date = (File.exist?(class_cache_file_path) and @@ -341,7 +341,7 @@ Options may also be set in the 'RI' environment variable. end def read_yaml(path) - YAML.load File.read(path).gsub(/ \!ruby\/(object|struct):(RDoc|RI).*/, '') + YAML.load File.read(path).gsub(/ \!ruby\/(object|struct):(RDoc::RI|RI).*/, '') end def run diff --git a/lib/rdoc/ri/formatter.rb b/lib/rdoc/ri/formatter.rb index 0a98508dde..960f2e3c91 100644 --- a/lib/rdoc/ri/formatter.rb +++ b/lib/rdoc/ri/formatter.rb @@ -99,17 +99,17 @@ class RDoc::RI::Formatter def display_list(list) case list.type - when SM::ListBase::BULLET + when RDoc::Markup::ListBase::BULLET prefixer = proc { |ignored| @indent + "* " } - when SM::ListBase::NUMBER, - SM::ListBase::UPPERALPHA, - SM::ListBase::LOWERALPHA + when RDoc::Markup::ListBase::NUMBER, + RDoc::Markup::ListBase::UPPERALPHA, + RDoc::Markup::ListBase::LOWERALPHA start = case list.type - when SM::ListBase::NUMBER then 1 - when SM::ListBase::UPPERALPHA then 'A' - when SM::ListBase::LOWERALPHA then 'a' + when RDoc::Markup::ListBase::NUMBER then 1 + when RDoc::Markup::ListBase::UPPERALPHA then 'A' + when RDoc::Markup::ListBase::LOWERALPHA then 'a' end prefixer = proc do |ignored| res = @indent + "#{start}.".ljust(4) @@ -117,15 +117,15 @@ class RDoc::RI::Formatter res end - when SM::ListBase::LABELED + when RDoc::Markup::ListBase::LABELED prefixer = proc do |li| li.label end - when SM::ListBase::NOTE + when RDoc::Markup::ListBase::NOTE longest = 0 list.contents.each do |item| - if item.kind_of?(SM::Flow::LI) && item.label.length > longest + if item.kind_of?(RDoc::Markup::Flow::LI) && item.label.length > longest longest = item.label.length end end @@ -140,7 +140,7 @@ class RDoc::RI::Formatter end list.contents.each do |item| - if item.kind_of? SM::Flow::LI + if item.kind_of? RDoc::Markup::Flow::LI prefix = prefixer.call(item) display_flow_item(item, prefix) else @@ -153,20 +153,20 @@ class RDoc::RI::Formatter def display_flow_item(item, prefix=@indent) case item - when SM::Flow::P, SM::Flow::LI + when RDoc::Markup::Flow::P, RDoc::Markup::Flow::LI wrap(conv_html(item.body), prefix) blankline - when SM::Flow::LIST + when RDoc::Markup::Flow::LIST display_list(item) - when SM::Flow::VERB + when RDoc::Markup::Flow::VERB display_verbatim_flow_item(item, @indent) - when SM::Flow::H + when RDoc::Markup::Flow::H display_heading(conv_html(item.text), item.level, @indent) - when SM::Flow::RULE + when RDoc::Markup::Flow::RULE draw_line else @@ -508,23 +508,23 @@ class RDoc::RI::HtmlFormatter < RDoc::RI::AttributeFormatter def display_list(list) case list.type - when SM::ListBase::BULLET + when RDoc::Markup::ListBase::BULLET list_type = "ul" prefixer = proc { |ignored| "
  • " } - when SM::ListBase::NUMBER, - SM::ListBase::UPPERALPHA, - SM::ListBase::LOWERALPHA + when RDoc::Markup::ListBase::NUMBER, + RDoc::Markup::ListBase::UPPERALPHA, + RDoc::Markup::ListBase::LOWERALPHA list_type = "ol" prefixer = proc { |ignored| "
  • " } - when SM::ListBase::LABELED + when RDoc::Markup::ListBase::LABELED list_type = "dl" prefixer = proc do |li| "
    " + escape(li.label) + "
    " end - when SM::ListBase::NOTE + when RDoc::Markup::ListBase::NOTE list_type = "table" prefixer = proc do |li| %{#{li.label.gsub(/ /, ' ')}} @@ -535,7 +535,7 @@ class RDoc::RI::HtmlFormatter < RDoc::RI::AttributeFormatter print "<#{list_type}>" list.contents.each do |item| - if item.kind_of? SM::Flow::LI + if item.kind_of? RDoc::Markup::Flow::LI prefix = prefixer.call(item) print prefix display_flow_item(item, prefix) diff --git a/lib/rdoc/ri/reader.rb b/lib/rdoc/ri/reader.rb index e56c9fb76e..986bb75954 100644 --- a/lib/rdoc/ri/reader.rb +++ b/lib/rdoc/ri/reader.rb @@ -1,7 +1,7 @@ require 'rdoc/ri' require 'rdoc/ri/descriptions' require 'rdoc/ri/writer' -require 'rdoc/markup/simple_markup/to_flow' +require 'rdoc/markup/to_flow' class RDoc::RI::Reader -- cgit v1.2.3