@@ -359,6 +359,10 @@ class RDoc::Options
359359 # Exclude the default patterns as well if true.
360360 attr_reader :apply_default_exclude
361361
362+ ##
363+ # Words to be ignored in autolink cross-references
364+ attr_accessor :autolink_excluded_words
365+
362366 def initialize loaded_options = nil # :nodoc:
363367 init_ivars
364368 override loaded_options if loaded_options
@@ -370,6 +374,7 @@ def initialize loaded_options = nil # :nodoc:
370374 ]
371375
372376 def init_ivars # :nodoc:
377+ @autolink_excluded_words = [ ]
373378 @dry_run = false
374379 @embed_mixins = false
375380 @exclude = [ ]
@@ -437,7 +442,9 @@ def init_with map # :nodoc:
437442 @title = map [ 'title' ]
438443 @visibility = map [ 'visibility' ]
439444 @webcvs = map [ 'webcvs' ]
440- @apply_default_exclude = map [ 'apply_default_exclude' ]
445+
446+ @apply_default_exclude = map [ 'apply_default_exclude' ]
447+ @autolink_excluded_words = map [ 'autolink_excluded_words' ]
441448
442449 @rdoc_include = sanitize_path map [ 'rdoc_include' ]
443450 @static_path = sanitize_path map [ 'static_path' ]
@@ -471,6 +478,7 @@ def override map # :nodoc:
471478 @title = map [ 'title' ] if map . has_key? ( 'title' )
472479 @visibility = map [ 'visibility' ] if map . has_key? ( 'visibility' )
473480 @webcvs = map [ 'webcvs' ] if map . has_key? ( 'webcvs' )
481+ @autolink_excluded_words = map [ 'autolink_excluded_words' ] if map . has_key? ( 'autolink_excluded_words' )
474482 @apply_default_exclude = map [ 'apply_default_exclude' ] if map . has_key? ( 'apply_default_exclude' )
475483
476484 @warn_missing_rdoc_ref = map [ 'warn_missing_rdoc_ref' ] if map . has_key? ( 'warn_missing_rdoc_ref' )
@@ -503,7 +511,8 @@ def == other # :nodoc:
503511 @title == other . title and
504512 @visibility == other . visibility and
505513 @webcvs == other . webcvs and
506- @apply_default_exclude == other . apply_default_exclude
514+ @apply_default_exclude == other . apply_default_exclude and
515+ @autolink_excluded_words == other . autolink_excluded_words
507516 end
508517
509518 ##
@@ -989,6 +998,13 @@ def parse argv
989998
990999 opt . separator nil
9911000
1001+ opt . on ( "--autolink-excluded-words=WORDS" , Array ,
1002+ "Words to be ignored in autolink cross-references" ) do |value |
1003+ @autolink_excluded_words . concat value
1004+ end
1005+
1006+ opt . separator nil
1007+
9921008 opt . on ( "--hyperlink-all" , "-A" ,
9931009 "Generate hyperlinks for all words that" ,
9941010 "correspond to known methods, even if they" ,
0 commit comments