Skip to content

Commit

Permalink
MAGETWO-71896: Static versioning and styles minification break email …
Browse files Browse the repository at this point in the history
…fonts styles #8241 #10638
  • Loading branch information
ishakhsuvarov committed Sep 4, 2017
1 parent 58694a6 commit dfa6f87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ public function testGetFilesEmogrifier($htmlFilePath, $cssFilePath, $cssExpected
$emogrifier->setCss($css);
$emogrifier->setHtml($html);
$result = $emogrifier->emogrify();

/**
* Tests a bug in the library where there's no spaces to CSS string before passing to Emogrifier
* to fix known parsing issue with library.
* This test should will fail when this bug is fixed in the library and we should fix the adapter.
* https://github.com/jjriv/emogrifier/issues/370
* This test was implemented for the issue which existed in the older version of Emogrifier.
* Test was updated, as the library got updated as well.
*/
$this->assertNotContains($cssExpected, $result);
$this->assertContains($cssExpected, $result);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ public function setHtml($html)
*/
public function setCss($css)
{
/**
* Adds space to CSS string before passing to Emogrifier to fix known parsing issue with library.
* https://github.com/jjriv/emogrifier/issues/370
*/
$cssWithAddedSpaces = preg_replace('#([\{\}>])#i', ' $1 ', $css);

$this->emogrifier->setCss($cssWithAddedSpaces);
$this->emogrifier->setCss($css);
}

/**
Expand Down

0 comments on commit dfa6f87

Please sign in to comment.