Skip to content
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

Skip hidden tree nodes in path expressions #323

Merged
merged 1 commit into from Nov 30, 2015

Conversation

lutter
Copy link
Member

@lutter lutter commented Nov 26, 2015

When we were evaluating path expressions, we were not skipping hidden tree
nodes, i.e. tree nodes whose label is NULL. In most cases, that's not
visible to users, but when we match something like /foo/*[2] where /foo has
a bunch of hidden children, the result was not what the user might expect,
as we might actually return a hidden node to aug_match, which would
suppress that node and make it seem to the user as if nothing had matched.

With this patch, we try to skip over hidden nodes while evaluating the path
expression to avoid this issue.

When we were evaluating path expressions, we were not skipping hidden tree
nodes, i.e. tree nodes whose label is NULL. In most cases, that's not
visible to users, but when we match something like /foo/*[2] where /foo has
a bunch of hidden children, the result was not what the user might expect,
as we might actually return a hidden node to aug_match, which would
suppress that node and make it seem to the user as if nothing had matched.

With this patch, we try to skip over hidden nodes while evaluating the path
expression to avoid this issue.

Thanks to Xavier Mol for reporting this
@lutter lutter merged commit d1c4a85 into hercules-team:master Nov 30, 2015
@lutter lutter deleted the dev/pathx-hidden branch November 30, 2015 22:00
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.

None yet

1 participant