8000 For AND operator, the left operand should have parentheses, not only right by achasseux · Pull Request #3 · symfony/css-selector · GitHub
[go: up one dir, main page]

Skip to content

For AND operator, the left operand should have parentheses, not only right #3

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

Closed

Conversation

achasseux
Copy link

Hello,

When CSS selector is translated into XPath, the following

e[foo!="bar"][foo!="baz"]

becomes :

e[not(@foo) or @foo != 'bar' and (not(@foo) or @foo != 'baz')]

It should become :

e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]

This pull request adds the left-operand parentheses.

@fabpot
Copy link
Member
fabpot commented Sep 28, 2015

@achasseux Sorry for being very late but this repository is read-only, so it's not really monitored by anyone. Could you open a pull request on symfony/symfony instead? Thanks you.

@nicolas-grekas
Copy link
Member

Moved to symfony/symfony#26010

nicolas-grekas added a commit to symfony/symfony that referenced this pull request Feb 3, 2018
…ve parentheses, not only right operand (Arnaud CHASSEUX)

This PR was merged into the 2.7 branch.

Discussion
----------

[CssSelector] For AND operator, the left operand should have parentheses, not only right operand

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

From symfony/css-selector#3

Commits
-------

76b40dc [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0