lib/yard/lib/yard/templates/helpers/markup/rdoc_markup.rb
def fix_typewriter(text)
            code_tags = 0
            text.gsub(/<(\/)?(pre|code|tt)|(\s|^|>)\+(?! )([^\n\+]{1,900})(?! )\+/) do |str|
              closed, tag, first_text, type_text, pre_text, no_match = $1, $2, $3, $4, $`, $&

              if tag
                code_tags += (closed ? -1 : 1)
                next str
              end
              next str unless code_tags == 0
              first_text + '<tt>' + CGI.escapeHTML(type_text) + '</tt>'
            end
          end
# Fixes RDoc behaviour with ++ only supporting alphanumeric text.
#
# @todo Refactor into own SimpleMarkup subclass
Fixes RDoc behaviour with ++ only supporting alphanumeric text.
Fixes RDoc behaviour with ++ only supporting alphanumeric text .
def fix_typewriter(text)
            code_tags = 0
            text.gsub(/<(\/)?(pre|code|tt)|(\s|^|>)\+(?! )([^\n\+]{1,900})(?! )\+/) do |str|
              closed, tag, first_text, type_text, pre_text, no_match = $1, $2, $3, $4, $`, $&
              if tag
                code_tags += (closed ? -1 : 1)
                next str
              end
              next str unless code_tags == 0
              first_text + '<tt>' + CGI.escapeHTML(type_text) + '</tt>'
            end
          end
def fix_typewriter ( text ) code_tags = 0 text . gsub ( / <( \/ )?(pre|code|tt)|( \s |^|>) \+ (?! )([^ \n \+ ]{1,900})(?! ) \+ / ) do | str | closed , tag , first_text , type_text , pre_text , no_match = $1 , $2 , $3 , $4 , $` , $& if tag code_tags += ( closed ? - 1 : 1 ) next str end next str unless code_tags == 0 first_text + '<tt>' + CGI . escapeHTML ( type_text ) + '</tt>' end end
Fixes RDoc behaviour with ++ only supporting alphanumeric text.
Fixes RDoc behaviour with ++ only supporting alphanumeric text .
text
todo
Refactor into own SimpleMarkup subclass
Refactor into own SimpleMarkup subclass