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

feature request: preserve ordering of input elements #151

Open
archenemies opened this issue Feb 18, 2021 · 0 comments
Open

feature request: preserve ordering of input elements #151

archenemies opened this issue Feb 18, 2021 · 0 comments

Comments

@archenemies
Copy link

This behavior is somewhat confusing:

$ echo "<a>hello</a><span>bye</span>"| pup 'a,span'
<a>
 hello
</a>
<span>
 bye
</span>
$ echo "<a>hello</a><span>bye</span>"| pup 'span,a'
<span>
 bye
</span>
<a>
 hello
</a>

I expected Pup to do one pass over the input, and to interpret the "," operator like a logical OR. In other words, the output for the second command should be the same as the output for the first command.

Someone else commented on this recently.

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

No branches or pull requests

1 participant