Skip to content

Commit 4271168

Browse files
committed
MAGETWO-71896: Merge branch 'MAGETWO-71896-PR-10638' of github.com:magento-engcom/magento2ce into develop-prs
2 parents bb5e7b9 + dfa6f87 commit 4271168

File tree

2 files changed

+5
-12
lines changed
  • dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter
  • lib/internal/Magento/Framework/Css/PreProcessor/Adapter

2 files changed

+5
-12
lines changed

dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,12 @@ public function testGetFilesEmogrifier($htmlFilePath, $cssFilePath, $cssExpected
7575
$emogrifier->setCss($css);
7676
$emogrifier->setHtml($html);
7777
$result = $emogrifier->emogrify();
78+
7879
/**
79-
* Tests a bug in the library where there's no spaces to CSS string before passing to Emogrifier
80-
* to fix known parsing issue with library.
81-
* This test should will fail when this bug is fixed in the library and we should fix the adapter.
82-
* https://github.com/jjriv/emogrifier/issues/370
80+
* This test was implemented for the issue which existed in the older version of Emogrifier.
81+
* Test was updated, as the library got updated as well.
8382
*/
84-
$this->assertNotContains($cssExpected, $result);
83+
$this->assertContains($cssExpected, $result);
8584
}
8685

8786
/**

lib/internal/Magento/Framework/Css/PreProcessor/Adapter/CssInliner.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ public function setHtml($html)
4141
*/
4242
public function setCss($css)
4343
{
44-
/**
45-
* Adds space to CSS string before passing to Emogrifier to fix known parsing issue with library.
46-
* https://github.com/jjriv/emogrifier/issues/370
47-
*/
48-
$cssWithAddedSpaces = preg_replace('#([\{\}>])#i', ' $1 ', $css);
49-
50-
$this->emogrifier->setCss($cssWithAddedSpaces);
44+
$this->emogrifier->setCss($css);
5145
}
5246

5347
/**

0 commit comments

Comments
 (0)