@@ -359,6 +359,10 @@ class RDoc::Options
359
359
# Exclude the default patterns as well if true.
360
360
attr_reader :apply_default_exclude
361
361
362
+ ##
363
+ # Words to be ignored in autolink cross-references
364
+ attr_accessor :autolink_excluded_words
365
+
362
366
def initialize loaded_options = nil # :nodoc:
363
367
init_ivars
364
368
override loaded_options if loaded_options
@@ -370,6 +374,7 @@ def initialize loaded_options = nil # :nodoc:
370
374
]
371
375
372
376
def init_ivars # :nodoc:
377
+ @autolink_excluded_words = [ ]
373
378
@dry_run = false
374
379
@embed_mixins = false
375
380
@exclude = [ ]
@@ -437,7 +442,9 @@ def init_with map # :nodoc:
437
442
@title = map [ 'title' ]
438
443
@visibility = map [ 'visibility' ]
439
444
@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' ]
441
448
442
449
@rdoc_include = sanitize_path map [ 'rdoc_include' ]
443
450
@static_path = sanitize_path map [ 'static_path' ]
@@ -471,6 +478,7 @@ def override map # :nodoc:
471
478
@title = map [ 'title' ] if map . has_key? ( 'title' )
472
479
@visibility = map [ 'visibility' ] if map . has_key? ( 'visibility' )
473
480
@webcvs = map [ 'webcvs' ] if map . has_key? ( 'webcvs' )
481
+ @autolink_excluded_words = map [ 'autolink_excluded_words' ] if map . has_key? ( 'autolink_excluded_words' )
474
482
@apply_default_exclude = map [ 'apply_default_exclude' ] if map . has_key? ( 'apply_default_exclude' )
475
483
476
484
@warn_missing_rdoc_ref = map [ 'warn_missing_rdoc_ref' ] if map . has_key? ( 'warn_missing_rdoc_ref' )
@@ -503,7 +511,8 @@ def == other # :nodoc:
503
511
@title == other . title and
504
512
@visibility == other . visibility and
505
513
@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
507
516
end
508
517
509
518
##
@@ -989,6 +998,13 @@ def parse argv
989
998
990
999
opt . separator nil
991
1000
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
+
992
1008
opt . on ( "--hyperlink-all" , "-A" ,
993
1009
"Generate hyperlinks for all words that" ,
994
1010
"correspond to known methods, even if they" ,
0 commit comments