module WidgetBuilder

Constants

ROOT_PATH
VERSION
WIDGET_LOADER_PATH

Private Class Methods

remove_excess_premailer_content(html) click to toggle source

removes styles that were added by default with the pre-mailer gem

# File lib/widget_builder.rb, line 194
def self.remove_excess_premailer_content(html)
        html = html.gsub(/^.*?<body.*?>(.*?)<\/body>.*$/m,'\1') # removes created html and body tags
        html = html.gsub(/\s*font-size:\s*normal\s*;\s*/, '')
        html = html.gsub(/\s*font-style:\s*normal\s*;\s*/, '')
        html = html.gsub(/\s*font-variant:\s*normal\s*;\s*/, '')
        html = html.gsub(/\s*line-height:\s*normal\s*;\s*/, '')
        html = html.gsub(/\s*font-weight:\s*normal\s*;\s*/, '')
end