Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow generation of links to absolute paths, which seems like a broke…

…n idea but

does fix a unit test.
  • Loading branch information...
commit 122b8ba92d7682b9c96d8d65e233fa0bceaa28df 1 parent d7362c9
designingpatts authored
2  lib/rdoc/markup/to_html_crossref.rb
@@ -65,7 +65,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
65 65 # The key thing is that there must be at least
66 66 # one special character (period, slash, or
67 67 # underscore).
68   - | \w+[_\/\.][\w\/\.]+
  68 + | [\/\w]+[_\/\.][\w\/\.]+
69 69
70 70 # Things that have markup suppressed
71 71 | \\[^\s]
3  test/test_rdoc_markup_to_html_crossref.rb
@@ -127,7 +127,8 @@ def verify_method_crossref(xref, reference, class_name, method_seq)
127 127 # file_name (String) for String reference.
128 128 #
129 129 def verify_file_crossref(xref, reference, file_name)
130   - result = "<a href=\"../files/#{file_name.gsub(/\./, '_')}.html\">#{reference}</a>"
  130 + generated_document_path = Pathname.new("../files/#{file_name.gsub(/\./, '_')}.html").cleanpath.to_s
  131 + result = "<a href=\"#{generated_document_path}\">#{reference}</a>"
131 132
132 133 verify_convert xref, reference, result
133 134 end

0 comments on commit 122b8ba

Please sign in to comment.
Something went wrong with that request. Please try again.