How to use the premailer.premailer.transform function in premailer

To help you get started, we’ve selected a few premailer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peterbe / premailer / premailer / test_premailer.py View on Github external
<h1>Hi!</h1>
        <p><strong>Yes!</strong></p>
        
        """

        expect_html = """
        
        <title>Title</title>
        
        
        <h1 style="color:red">Hi!</h1>
        <p><strong style="text-decoration:none">Yes!</strong></p>
        
        """

        result_html = transform(html)
        compare_html(expect_html, result_html)