diff options
author | hyrious <[email protected]> | 2020-07-21 23:55:04 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-07-22 02:35:12 +0900 |
commit | 02951a45f0684b647499a214870a39acf1b6f422 (patch) | |
tree | 616cc4528dcbb362682ebd08ec4243fb641b1987 /lib/rdoc/markup | |
parent | 7693aa705619752b57de192951cc688338653715 (diff) |
[ruby/rdoc] Create link to unary operator methods correctly
https://github.com/ruby/rdoc/commit/54500cf12a
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r-- | lib/rdoc/markup/to_html_crossref.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb index 77e3a94107..a9fd09df41 100644 --- a/lib/rdoc/markup/to_html_crossref.rb +++ b/lib/rdoc/markup/to_html_crossref.rb @@ -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 |