Skip to content

Commit

Permalink
Escape some code parts in manual. (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 authored Jan 25, 2025
1 parent d8463c2 commit 18bd837
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
20 changes: 10 additions & 10 deletions docs/content/manual/dev/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1011,15 +1011,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 @@ -2292,13 +2292,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 @@ -2307,22 +2307,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 @@ -2844,7 +2844,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.

0 comments on commit 18bd837

Please sign in to comment.