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

Query parser should ignore leading and trailing whitespace #166

Closed
V0ldek opened this issue Jun 25, 2023 · 1 comment · Fixed by #418
Closed

Query parser should ignore leading and trailing whitespace #166

V0ldek opened this issue Jun 25, 2023 · 1 comment · Fixed by #418
Labels
area: app Improvements in overall CLI app usability good first issue Good for newcomers help wanted External contributions welcome type: feature New feature or request
Milestone

Comments

@V0ldek
Copy link
Member

V0ldek commented Jun 25, 2023

Is your feature request related to a problem? Please describe.
Parsing a JSONPath query with leading or trailing whitespace causes a parsing error.

This is definitely not what we want for the CLI. As to the library, I'm not sure.

Describe the solution you'd like
The CLI should accept queries with leading or trailing whitespace by simply trimming them.

The library should be investigated – check how existing crates with query parsing treat it (regex) and see what's considered idiomatic.

Additional context
rq -c ' $..a ' should work.

@V0ldek V0ldek added the type: feature New feature or request label Jun 25, 2023
@github-actions github-actions bot added the acceptance: triage Waiting for owner's input label Jun 25, 2023
@github-actions
Copy link

Tagging @V0ldek for notifications

@V0ldek V0ldek added this to the v1.0.0 milestone Jun 25, 2023
@github-actions github-actions bot added acceptance: go ahead Reviewed, implementation can start and removed acceptance: triage Waiting for owner's input labels Jun 25, 2023
@V0ldek V0ldek added help wanted External contributions welcome good first issue Good for newcomers mod: parser area: app Improvements in overall CLI app usability labels Jun 25, 2023
@V0ldek V0ldek moved this from Todo to In Progress in Active rsonpath development Sep 29, 2023
@V0ldek V0ldek moved this from In Progress to Todo in Active rsonpath development Sep 29, 2023
@V0ldek V0ldek removed the mod: parser label Oct 4, 2023
V0ldek added a commit that referenced this issue Jan 8, 2024
- `rsonpath-syntax` disallows leading and trailing
whitespace by default, but can relax this with parser options;
- main parser used in `rq` now ignores leading and trailing query whitespace

Ref: #166
V0ldek added a commit that referenced this issue Jan 9, 2024
- `rsonpath-syntax` disallows leading and trailing
whitespace by default, but can relax this with parser options;
- main parser used in `rq` now ignores leading and trailing query whitespace

Ref: #166
V0ldek added a commit that referenced this issue Jan 9, 2024
- `rsonpath-syntax` disallows leading and trailing
whitespace by default, but can relax this with parser options;
- main parser used in `rq` now ignores leading and trailing query whitespace

Ref: #166
V0ldek added a commit that referenced this issue Jan 9, 2024
- `rsonpath-syntax` disallows leading and trailing
whitespace by default, but can relax this with parser options;
- main parser used in `rq` now ignores leading and trailing query whitespace

Ref: #166
V0ldek added a commit that referenced this issue Jan 10, 2024
- `rsonpath-syntax` disallows leading and trailing
whitespace by default, but can relax this with parser options;
- main parser used in `rq` now ignores leading and trailing query whitespace

Ref: #166
@github-actions github-actions bot removed the acceptance: go ahead Reviewed, implementation can start label Jan 10, 2024
@V0ldek V0ldek moved this from Merged to Released in Active rsonpath development Mar 16, 2024
@V0ldek V0ldek moved this from Todo to Released in Active rq development Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: app Improvements in overall CLI app usability good first issue Good for newcomers help wanted External contributions welcome type: feature New feature or request
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

1 participant