mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
[ruby/rdoc] Add autolink_excluded_words option to ignore
cross-references
(https://github.com/ruby/rdoc/pull/1259)
This config will be handy when the project name is the same as a class or
module name, which is often the case for most of the projects.
ce77f51f63
This commit is contained in:
parent
63b141ef21
commit
c0e2623966
4 changed files with 38 additions and 2 deletions
|
@ -83,6 +83,8 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
|
|||
def handle_regexp_CROSSREF(target)
|
||||
name = target.text
|
||||
|
||||
return name if @options.autolink_excluded_words&.include?(name)
|
||||
|
||||
return name if name =~ /@[\w-]+\.[\w-]/ # labels that look like emails
|
||||
|
||||
unless @hyperlink_all then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue