* backport r32935 from trunk

* lib/rdoc:  Import RDoc 3.9.2.  Fixes TIDYLINK for HTML output.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-08-11 18:44:10 +00:00
parent 6de14984a5
commit a750006eda
4 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Fri Aug 12 03:24:35 2011 Eric Hodel <drbrain@segment7.net>
* backport r32935 from trunk
* lib/rdoc: Import RDoc 3.9.2. Fixes TIDYLINK for HTML output.
Tue Aug 2 22:04:46 2011 NARUSE, Yui <naruse@ruby-lang.org> Tue Aug 2 22:04:46 2011 NARUSE, Yui <naruse@ruby-lang.org>
* backport r32815 from trunk. * backport r32815 from trunk.

View file

@ -104,7 +104,7 @@ module RDoc
## ##
# RDoc version you are using # RDoc version you are using
VERSION = '3.9.1' VERSION = '3.9.2'
## ##
# Method visibilities # Method visibilities

View file

@ -74,7 +74,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
@markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) @markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK)
# and links of the form <text>[<url>] # and links of the form <text>[<url>]
@markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK) @markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\])/, :TIDYLINK)
init_tags init_tags
end end

View file

@ -25,6 +25,12 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
assert_equal "\n<p><a href=\"C1.html\">C1</a></p>\n", result assert_equal "\n<p><a href=\"C1.html\">C1</a></p>\n", result
end end
def test_convert_TIDYLINK_rdoc_ref
result = @to.convert '{foo}[rdoc-ref:C1]'
assert_equal "\n<p><a href=\"C1.html\">foo</a></p>\n", result
end
def test_gen_url def test_gen_url
assert_equal '<a href="C1.html">Some class</a>', assert_equal '<a href="C1.html">Some class</a>',
@to.gen_url('rdoc-ref:C1', 'Some class') @to.gen_url('rdoc-ref:C1', 'Some class')