Skip to content

Commit

Permalink
Escape some code parts in manual.
Browse files Browse the repository at this point in the history
This is needed to make the Markdown -> HTML conversion work with Pandoc, see jqlang#3183.
  • Loading branch information
01mf02 authored Sep 27, 2024
1 parent 860af44 commit cc9d5ce
Showing 1 changed file with 10 additions and 10 deletions.
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

0 comments on commit cc9d5ce

Please sign in to comment.