method
add_word_pair
v1_9_1_378 -
Show latest stable
- Class:
RDoc::Markup::AttributeManager
add_word_pair(start, stop, name)public
No documentation available.
# File lib/rdoc/markup/attribute_manager.rb, line 149
def add_word_pair(start, stop, name)
raise ArgumentError, "Word flags may not start with '<'" if
start[0,1] == '<'
bitmap = RDoc::Markup::Attribute.bitmap_for name
if start == stop then
MATCHING_WORD_PAIRS[start] = bitmap
else
pattern = /(#{Regexp.escape start})(\S+)(#{Regexp.escape stop})/
WORD_PAIR_MAP[pattern] = bitmap
end
PROTECTABLE << start[0,1]
PROTECTABLE.uniq!
end