class CodeRay::Encoders::HTML

def text_token text, kind

def text_token text, kind
  if text =~ /#{HTML_ESCAPE_PATTERN}/o
    text = text.gsub(/#{HTML_ESCAPE_PATTERN}/o) { |m| @HTML_ESCAPE[m] }
  end
  if style = @span_for_kind[@last_opened ? [kind, *@opened] : kind]
    @out << style << text << '</span>'
  else
    @out << text
  end
end