upgrade to rdoc 3.6.1
Simon Rozet simon@rozet.name
Mon, 27 Jun 2011 20:36:37 +0200
2 files changed,
12 insertions(+),
21 deletions(-)
M
lib/github/markup/rdoc.rb
→
lib/github/markup/rdoc.rb
@@ -1,5 +1,4 @@
-require 'rdoc/generators/html_generator' -require 'ostruct' +require "rdoc/markup/to_html" module GitHub module Markup@@ -9,11 +8,8 @@ @content = content
end def to_html - simple_markup = SM::SimpleMarkup.new - generator = Generators::HyperlinkHtml.new('', OpenStruct.new) - simple_markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) - simple_markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK) - simple_markup.convert(@content, generator) + h = ::RDoc::Markup::ToHtml.new + h.convert(@content) end end end
M
test/markups/README.rdoc.html
→
test/markups/README.rdoc.html
@@ -1,16 +1,11 @@
-<ul> -<li>One +<ul><li> +<p>One</p> +</li><li> +<p>Two</p> +</li></ul> -</li> -<li>Two +<p>This is an <a href="http://github.com">absolute link</a>. So is this: <a +href="http://github.com">github.com</a></p> -</li> -</ul> -<p> -This is an <a href="http://github.com">absolute link</a>. So is this: <a -href="http://github.com">github.com</a> -</p> -<p> -This is a <a href="rawr.html">relative link</a>. So is this: <a -href="rawr.html">rawr.html</a> -</p> +<p>This is a <a href="rawr.html">relative link</a>. So is this: <a +href="rawr.html">rawr.html</a></p>