-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addExcludedSelector()/removeExcludedSelector() #207
Conversation
Whenever I squash this and try to push, I just get forced into an endless loop of pull+merge upstream branch and having to redo the squash again. Should I push the squashed feature in a different branch? |
8fed3c8
to
6e950de
Compare
Never mind; got it. Needed to do a force push. |
@@ -72,6 +72,8 @@ class Emogrifier | |||
* @var string | |||
*/ | |||
private $css = ''; | |||
|
|||
private $excludedSelectors = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an @ var PHPDoc.
Please also add a few lines about this new feature to the README. |
{ | ||
$css = 'p { margin: 0; }'; | ||
$this->subject->setHtml($this->html5DocumentType . '<html><body>' . | ||
'<p class="x"></p><p></p></body></html>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, the second p tag is not important for this test.
I'm done. This, including all the tweaks, could have been done many hours of work ago and I no longer feel my time is best spent continuing on. Feel free to take over this and my other changes. |
@vanderlee That's very sad to hear. I really appreciate your contributions. |
Hi @vanderlee, I've polished your changes, created a new PR #215 for them and merged the new PR. Thanks for contributing! |
Added methods
addExcludedSelector()
andremoveExcludedSelector()
that let you add selectors which should be excluded from processing. This is convenient to filter out nodes that are needed by other tools without having to change the style.A unittest is included.