Skip to content

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
@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