Skip to content

Commit

Permalink
upgrade to rdoc 3.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sr committed Jun 27, 2011
1 parent 4b9db44 commit ae7c137
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
10 changes: 3 additions & 7 deletions 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
Expand All @@ -9,11 +8,8 @@ def initialize(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
Expand Down
23 changes: 9 additions & 14 deletions 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>

0 comments on commit ae7c137

Please sign in to comment.