mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
7693aa7056
commit
02951a45f0
2 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ class RDoc::CrossReference
|
|||
#
|
||||
# See CLASS_REGEXP_STR
|
||||
|
||||
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
|
||||
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>|\+@|-@|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
|
||||
|
||||
##
|
||||
# Regular expressions matching text that should potentially have
|
||||
|
|
|
@ -62,7 +62,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
|
|||
|
||||
name = name[1..-1] unless @show_hash if name[0, 1] == '#'
|
||||
|
||||
if name =~ /(.*[^#:])@/
|
||||
if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
|
||||
text ||= "#{CGI.unescape $'} at <code>#{$1}</code>"
|
||||
code = false
|
||||
else
|
||||
|
@ -138,7 +138,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
|
|||
# Creates an HTML link to +name+ with the given +text+.
|
||||
|
||||
def link name, text, code = true
|
||||
if name =~ /(.*[^#:])@/ then
|
||||
if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
|
||||
name = $1
|
||||
label = $'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue