Skip to content

Commit 18bd837

Browse files
authored
Escape some code parts in manual. (#3184)
1 parent d8463c2 commit 18bd837

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

docs/content/manual/dev/manual.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,15 @@ sections:
10111011
10121012
The key difference between `map(f)` and `map_values(f)` is
10131013
that the former simply forms an array from all the values of
1014-
`($x|f)` for each value, $x, in the input array or object,
1014+
`($x|f)` for each value, `$x`, in the input array or object,
10151015
but `map_values(f)` only uses `first($x|f)`.
10161016
10171017
Specifically, for object inputs, `map_values(f)` constructs
10181018
the output object by examining in turn the value of
1019-
`first(.[$k]|f)` for each key, $k, of the input. If this
1019+
`first(.[$k]|f)` for each key, `$k`, of the input. If this
10201020
expression produces no values, then the corresponding key
10211021
will be dropped; otherwise, the output object will have that
1022-
value at the key, $k.
1022+
value at the key, `$k`.
10231023
10241024
Here are some examples to clarify the behavior of `map` and
10251025
`map_values` when applied to arrays. These examples assume the
@@ -2292,13 +2292,13 @@ sections:
22922292
22932293
jq provides a few SQL-style operators.
22942294
2295-
* INDEX(stream; index_expression):
2295+
* `INDEX(stream; index_expression)`:
22962296
22972297
This builtin produces an object whose keys are computed by
22982298
the given index expression applied to each value from the
22992299
given stream.
23002300
2301-
* JOIN($idx; stream; idx_expr; join_expr):
2301+
* `JOIN($idx; stream; idx_expr; join_expr)`:
23022302
23032303
This builtin joins the values from the given stream to the
23042304
given index. The index's keys are computed by applying the
@@ -2307,22 +2307,22 @@ sections:
23072307
value from the index is fed to the given join expression to
23082308
produce each result.
23092309
2310-
* JOIN($idx; stream; idx_expr):
2310+
* `JOIN($idx; stream; idx_expr)`:
23112311
23122312
Same as `JOIN($idx; stream; idx_expr; .)`.
23132313
2314-
* JOIN($idx; idx_expr):
2314+
* `JOIN($idx; idx_expr)`:
23152315
23162316
This builtin joins the input `.` to the given index, applying
23172317
the given index expression to `.` to compute the index key.
23182318
The join operation is as described above.
23192319
2320-
* IN(s):
2320+
* `IN(s)`:
23212321
23222322
This builtin outputs `true` if `.` appears in the given
23232323
stream, otherwise it outputs `false`.
23242324
2325-
* IN(source; s):
2325+
* `IN(source; s)`:
23262326
23272327
This builtin outputs `true` if any value in the source stream
23282328
appears in the second stream, otherwise it outputs `false`.
@@ -2844,7 +2844,7 @@ sections:
28442844
{"title": "First post", "author": "Anonymous Coward"}
28452845
{"title": "A well-written article", "author": "Person McPherson"}
28462846
2847-
We use a variable, $names, to store the realnames object, so that we
2847+
We use a variable, `$names`, to store the realnames object, so that we
28482848
can refer to it later when looking up author usernames:
28492849
28502850
.realnames as $names | .posts[] | {title, author: $names[.author]}

docs/content/manual/v1.7/manual.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -999,15 +999,15 @@ sections:
999999
10001000
The key difference between `map(f)` and `map_values(f)` is
10011001
that the former simply forms an array from all the values of
1002-
`($x|f)` for each value, $x, in the input array or object,
1002+
`($x|f)` for each value, `$x`, in the input array or object,
10031003
but `map_values(f)` only uses `first($x|f)`.
10041004
10051005
Specifically, for object inputs, `map_values(f)` constructs
10061006
the output object by examining in turn the value of
1007-
`first(.[$k]|f)` for each key, $k, of the input. If this
1007+
`first(.[$k]|f)` for each key, `$k`, of the input. If this
10081008
expression produces no values, then the corresponding key
10091009
will be dropped; otherwise, the output object will have that
1010-
value at the key, $k.
1010+
value at the key, `$k`.
10111011
10121012
Here are some examples to clarify the behavior of `map` and
10131013
`map_values` when applied to arrays. These examples assume the
@@ -2239,13 +2239,13 @@ sections:
22392239
22402240
jq provides a few SQL-style operators.
22412241
2242-
* INDEX(stream; index_expression):
2242+
* `INDEX(stream; index_expression)`:
22432243
22442244
This builtin produces an object whose keys are computed by
22452245
the given index expression applied to each value from the
22462246
given stream.
22472247
2248-
* JOIN($idx; stream; idx_expr; join_expr):
2248+
* `JOIN($idx; stream; idx_expr; join_expr)`:
22492249
22502250
This builtin joins the values from the given stream to the
22512251
given index. The index's keys are computed by applying the
@@ -2254,22 +2254,22 @@ sections:
22542254
value from the index is fed to the given join expression to
22552255
produce each result.
22562256
2257-
* JOIN($idx; stream; idx_expr):
2257+
* `JOIN($idx; stream; idx_expr)`:
22582258
22592259
Same as `JOIN($idx; stream; idx_expr; .)`.
22602260
2261-
* JOIN($idx; idx_expr):
2261+
* `JOIN($idx; idx_expr)`:
22622262
22632263
This builtin joins the input `.` to the given index, applying
22642264
the given index expression to `.` to compute the index key.
22652265
The join operation is as described above.
22662266
2267-
* IN(s):
2267+
* `IN(s)`:
22682268
22692269
This builtin outputs `true` if `.` appears in the given
22702270
stream, otherwise it outputs `false`.
22712271
2272-
* IN(source; s):
2272+
* `IN(source; s)`:
22732273
22742274
This builtin outputs `true` if any value in the source stream
22752275
appears in the second stream, otherwise it outputs `false`.
@@ -2789,7 +2789,7 @@ sections:
27892789
{"title": "First post", "author": "Anonymous Coward"}
27902790
{"title": "A well-written article", "author": "Person McPherson"}
27912791
2792-
We use a variable, $names, to store the realnames object, so that we
2792+
We use a variable, `$names`, to store the realnames object, so that we
27932793
can refer to it later when looking up author usernames:
27942794
27952795
.realnames as $names | .posts[] | {title, author: $names[.author]}

jq.1.prebuilt

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)