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

Comment bug fixes, and fully support Tcl-style multiline comments #2942

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

emanuele6
Copy link
Member

@emanuele6 emanuele6 commented Nov 3, 2023

  • bugfix: comments were incorrectly being terminated by CR; for example

    jq -n $'1 #foo\r'
    

    fails to compile because the CR character terminates the comment, and CR is not a valid character in jq syntax.

  • improvement: comments fully support Tcl-style line continuation. Previously this was only "supported" in -f scripts, whose first line starts with "#!", and second line starts with # and ends with \, only for the comment on the second line, only for one extra line.

  • man: document comment syntax, which was previously undocumented.

  • tests: add regression tests for the bugfix, and some tests for line continuation in comments.

* bugfix: comments were incorrectly being terminated by CR; for example
    jq -n $'1 #foo\r'
  fails to compile because the CR character terminates the comment, and
  CR is not a valid character in jq syntax.

* improvement: comments fully support Tcl-style line continuation.
  Previously this was only "supported" in `-f' scripts, whose first line
  starts with "#!", and second line starts with # and ends with \, only
  for the comment on the second line, only for one extra line.

* man: document comment syntax, which was previously undocumented.

* tests: add regression tests for the bugfix, and some tests for line
  continuation in comments.
@nicowilliams
Copy link
Contributor

LGTM!

@nicowilliams nicowilliams merged commit cca1f7d into jqlang:master Nov 3, 2023
29 checks passed
@nicowilliams
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants