diff options
Diffstat (limited to 'lib/rdoc/markup/to_html_crossref.rb')
-rw-r--r-- | lib/rdoc/markup/to_html_crossref.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb index 4a3f028135..77e3a94107 100644 --- a/lib/rdoc/markup/to_html_crossref.rb +++ b/lib/rdoc/markup/to_html_crossref.rb @@ -39,10 +39,18 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml @hyperlink_all = @options.hyperlink_all @show_hash = @options.show_hash - crossref_re = @hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP + @cross_reference = RDoc::CrossReference.new @context + end + + def init_link_notation_regexp_handlings + add_regexp_handling_RDOCLINK + + # The crossref must be linked before tidylink because Klass.method[:sym] + # will be processed as a tidylink first and will be broken. + crossref_re = @options.hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP @markup.add_regexp_handling crossref_re, :CROSSREF - @cross_reference = RDoc::CrossReference.new @context + add_regexp_handling_TIDYLINK end ## |