summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup/attribute_manager.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/markup/attribute_manager.rb')
-rw-r--r--lib/rdoc/markup/attribute_manager.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/rdoc/markup/attribute_manager.rb b/lib/rdoc/markup/attribute_manager.rb
index 601e6bc189..f6eb06da95 100644
--- a/lib/rdoc/markup/attribute_manager.rb
+++ b/lib/rdoc/markup/attribute_manager.rb
@@ -1,19 +1,19 @@
# frozen_string_literal: true
+
##
# Manages changes of attributes in a block of text
-unless MatchData.method_defined?(:match_length)
- using Module.new {
- refine(MatchData) {
- def match_length(nth)
- b, e = offset(nth)
- e - b if b
- end
- }
- }
-end
-
class RDoc::Markup::AttributeManager
+ unless ::MatchData.method_defined?(:match_length)
+ using ::Module.new {
+ refine(::MatchData) {
+ def match_length(nth) # :nodoc:
+ b, e = offset(nth)
+ e - b if b
+ end
+ }
+ }
+ end
##
# The NUL character
@@ -138,6 +138,7 @@ class RDoc::Markup::AttributeManager
res
end
+ # :nodoc:
def exclusive?(attr)
(attr & @exclusive_bitmap) != 0
end
@@ -155,6 +156,7 @@ class RDoc::Markup::AttributeManager
convert_attrs_word_pair_map(str, attrs, exclusive)
end
+ # :nodoc:
def convert_attrs_matching_word_pairs(str, attrs, exclusive)
# first do matching ones
tags = @matching_word_pairs.select { |start, bitmap|
@@ -179,6 +181,7 @@ class RDoc::Markup::AttributeManager
str.delete!(NON_PRINTING_START + NON_PRINTING_END)
end
+ # :nodoc:
def convert_attrs_word_pair_map(str, attrs, exclusive)
# then non-matching
unless @word_pair_map.empty? then
@@ -400,4 +403,3 @@ class RDoc::Markup::AttributeManager
end
end
-