Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae7c137

Browse files
committed
upgrade to rdoc 3.6.1
1 parent 4b9db44 commit ae7c137

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

lib/github/markup/rdoc.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
require 'rdoc/generators/html_generator'
2-
require 'ostruct'
1+
require "rdoc/markup/to_html"
32

43
module GitHub
54
module Markup
@@ -9,11 +8,8 @@ def initialize(content)
98
end
109

1110
def to_html
12-
simple_markup = SM::SimpleMarkup.new
13-
generator = Generators::HyperlinkHtml.new('', OpenStruct.new)
14-
simple_markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK)
15-
simple_markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK)
16-
simple_markup.convert(@content, generator)
11+
h = ::RDoc::Markup::ToHtml.new
12+
h.convert(@content)
1713
end
1814
end
1915
end

test/markups/README.rdoc.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
<ul>
2-
<li>One
1+
<ul><li>
2+
<p>One</p>
3+
</li><li>
4+
<p>Two</p>
5+
</li></ul>
36

4-
</li>
5-
<li>Two
7+
<p>This is an <a href="http://github.com">absolute link</a>. So is this: <a
8+
href="http://github.com">github.com</a></p>
69

7-
</li>
8-
</ul>
9-
<p>
10-
This is an <a href="http://github.com">absolute link</a>. So is this: <a
11-
href="http://github.com">github.com</a>
12-
</p>
13-
<p>
14-
This is a <a href="rawr.html">relative link</a>. So is this: <a
15-
href="rawr.html">rawr.html</a>
16-
</p>
10+
<p>This is a <a href="rawr.html">relative link</a>. So is this: <a
11+
href="rawr.html">rawr.html</a></p>

0 commit comments

Comments
 (0)