Method: CodeSlide::Analyzer#_text

Defined in:
lib/code_slide/analyzer.rb

#_text(text) ⇒ Object



125
126
127
128
129
130
131
132
# File 'lib/code_slide/analyzer.rb', line 125

def _text(text)
  text.to_s.
    tr(' ', "\u00A0").
    gsub(/\&(.*?);/) do |match|
      entity = Regexp.last_match(1)
      ENTITY[entity.downcase] || match
    end
end