diff options
Diffstat (limited to 'lib/rdoc/markup/attribute_manager.rb')
-rw-r--r-- | lib/rdoc/markup/attribute_manager.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/rdoc/markup/attribute_manager.rb b/lib/rdoc/markup/attribute_manager.rb index 71d5e2b2cc..7ee6f423d6 100644 --- a/lib/rdoc/markup/attribute_manager.rb +++ b/lib/rdoc/markup/attribute_manager.rb @@ -168,15 +168,13 @@ class RDoc::Markup::AttributeManager # Converts special sequences to RDoc attributes def convert_specials str, attrs - unless @special.empty? - @special.each do |regexp, attribute| - str.scan(regexp) do - capture = $~.size == 1 ? 0 : 1 + @special.each do |regexp, attribute| + str.scan(regexp) do + capture = $~.size == 1 ? 0 : 1 - s, e = $~.offset capture + s, e = $~.offset capture - attrs.set_attrs s, e - s, attribute | @attributes.special - end + attrs.set_attrs s, e - s, attribute | @attributes.special end end end |