module EvilFront::English
Private Class Methods
tiny_words()
click to toggle source
Small words to insert non-break space before them
# File lib/evil-front/english.rb, line 18 def self.tiny_words @tiny_words ||= begin tiny = %w(to is be the a an no if at on of in or and) tiny += tiny.map(&:capitalize) tiny.map { |i| Regexp.new("( | )(#{Regexp.quote i}) ") } end end
use_right_symbols(text)
click to toggle source
Replace symbols to right ones, like m-dash, quotes, etc.
# File lib/evil-front/english.rb, line 13 def self.use_right_symbols(text) RubyPants.new(text).to_html end