Fix --tag help text to match actual behaviour on attribute/text matches - #1
Open
gthb wants to merge 1 commit into
Open
Fix --tag help text to match actual behaviour on attribute/text matches#1gthb wants to merge 1 commit into
gthb wants to merge 1 commit into
Conversation
The `--tag` flag annotates attribute and text matches with the parent element's synthetic self-closing tag --- documented in the usage docs and exercised by the existing `no_filename_no_part_with_tag_shows_parent _element_then_value` integration test. The CLI doc-comment, however, said "No effect on attribute, text, or atomic matches", which contradicts both the docs and the implementation. Only atomic results from XPath functions like `name()` and `count()` are unaffected. Bring the help text in line with the docs and the test suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bring the
--tagflag's--helptext in line with the behaviour and the usage docs.Why
The CLI doc-comment currently says:
But that's only true for atomic results. For attribute and text matches
--tagdoes annotate the output with the parent element's synthetic self-closing tag, which is what the usage docs describe: “For attribute and text matches, the tag is the parent element”, and what integration testno_filename_no_part_with_tag_shows_parent_element_then_valueexercises.