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

Escape some code parts in manual. #3184

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/content/manual/dev/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1009,15 +1009,15 @@ sections:

The key difference between `map(f)` and `map_values(f)` is
that the former simply forms an array from all the values of
`($x|f)` for each value, $x, in the input array or object,
`($x|f)` for each value, `$x`, in the input array or object,
but `map_values(f)` only uses `first($x|f)`.

Specifically, for object inputs, `map_values(f)` constructs
the output object by examining in turn the value of
`first(.[$k]|f)` for each key, $k, of the input. If this
`first(.[$k]|f)` for each key, `$k`, of the input. If this
expression produces no values, then the corresponding key
will be dropped; otherwise, the output object will have that
value at the key, $k.
value at the key, `$k`.

Here are some examples to clarify the behavior of `map` and
`map_values` when applied to arrays. These examples assume the
Expand Down Expand Up @@ -2290,13 +2290,13 @@ sections:

jq provides a few SQL-style operators.

* INDEX(stream; index_expression):
* `INDEX(stream; index_expression)`:

This builtin produces an object whose keys are computed by
the given index expression applied to each value from the
given stream.

* JOIN($idx; stream; idx_expr; join_expr):
* `JOIN($idx; stream; idx_expr; join_expr)`:

This builtin joins the values from the given stream to the
given index. The index's keys are computed by applying the
Expand All @@ -2305,22 +2305,22 @@ sections:
value from the index is fed to the given join expression to
produce each result.

* JOIN($idx; stream; idx_expr):
* `JOIN($idx; stream; idx_expr)`:

Same as `JOIN($idx; stream; idx_expr; .)`.

* JOIN($idx; idx_expr):
* `JOIN($idx; idx_expr)`:

This builtin joins the input `.` to the given index, applying
the given index expression to `.` to compute the index key.
The join operation is as described above.

* IN(s):
* `IN(s)`:

This builtin outputs `true` if `.` appears in the given
stream, otherwise it outputs `false`.

* IN(source; s):
* `IN(source; s)`:

This builtin outputs `true` if any value in the source stream
appears in the second stream, otherwise it outputs `false`.
Expand Down Expand Up @@ -2842,7 +2842,7 @@ sections:
{"title": "First post", "author": "Anonymous Coward"}
{"title": "A well-written article", "author": "Person McPherson"}

We use a variable, $names, to store the realnames object, so that we
We use a variable, `$names`, to store the realnames object, so that we
can refer to it later when looking up author usernames:

.realnames as $names | .posts[] | {title, author: $names[.author]}
Expand Down
20 changes: 10 additions & 10 deletions docs/content/manual/v1.7/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -999,15 +999,15 @@ sections:

The key difference between `map(f)` and `map_values(f)` is
that the former simply forms an array from all the values of
`($x|f)` for each value, $x, in the input array or object,
`($x|f)` for each value, `$x`, in the input array or object,
but `map_values(f)` only uses `first($x|f)`.

Specifically, for object inputs, `map_values(f)` constructs
the output object by examining in turn the value of
`first(.[$k]|f)` for each key, $k, of the input. If this
`first(.[$k]|f)` for each key, `$k`, of the input. If this
expression produces no values, then the corresponding key
will be dropped; otherwise, the output object will have that
value at the key, $k.
value at the key, `$k`.

Here are some examples to clarify the behavior of `map` and
`map_values` when applied to arrays. These examples assume the
Expand Down Expand Up @@ -2239,13 +2239,13 @@ sections:

jq provides a few SQL-style operators.

* INDEX(stream; index_expression):
* `INDEX(stream; index_expression)`:

This builtin produces an object whose keys are computed by
the given index expression applied to each value from the
given stream.

* JOIN($idx; stream; idx_expr; join_expr):
* `JOIN($idx; stream; idx_expr; join_expr)`:

This builtin joins the values from the given stream to the
given index. The index's keys are computed by applying the
Expand All @@ -2254,22 +2254,22 @@ sections:
value from the index is fed to the given join expression to
produce each result.

* JOIN($idx; stream; idx_expr):
* `JOIN($idx; stream; idx_expr)`:

Same as `JOIN($idx; stream; idx_expr; .)`.

* JOIN($idx; idx_expr):
* `JOIN($idx; idx_expr)`:

This builtin joins the input `.` to the given index, applying
the given index expression to `.` to compute the index key.
The join operation is as described above.

* IN(s):
* `IN(s)`:

This builtin outputs `true` if `.` appears in the given
stream, otherwise it outputs `false`.

* IN(source; s):
* `IN(source; s)`:

This builtin outputs `true` if any value in the source stream
appears in the second stream, otherwise it outputs `false`.
Expand Down Expand Up @@ -2789,7 +2789,7 @@ sections:
{"title": "First post", "author": "Anonymous Coward"}
{"title": "A well-written article", "author": "Person McPherson"}

We use a variable, $names, to store the realnames object, so that we
We use a variable, `$names`, to store the realnames object, so that we
can refer to it later when looking up author usernames:

.realnames as $names | .posts[] | {title, author: $names[.author]}
Expand Down
20 changes: 10 additions & 10 deletions jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading