Skip to content

Commit 3f972a3

Browse files
committed
docs: Fix a try-catch example (fix jqlang#1558, jqlang#1777)
1 parent 90bfa96 commit 3f972a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: docs/content/manual/manual.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ sections:
22562256
# Repeat an expression until it raises "break" as an
22572257
# error, then stop repeating without re-raising the error.
22582258
# But if the error caught is not "break" then re-raise it.
2259-
try repeat(exp) catch .=="break" then empty else error;
2259+
try repeat(exp) catch if .=="break" then empty else error
22602260
22612261
jq has a syntax for named lexical labels to "break" or "go (back) to":
22622262

Diff for: docs/content/manual/v1.5/manual.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ sections:
19201920
# Repeat an expression until it raises "break" as an
19211921
# error, then stop repeating without re-raising the error.
19221922
# But if the error caught is not "break" then re-raise it.
1923-
try repeat(exp) catch .=="break" then empty else error;
1923+
try repeat(exp) catch if .=="break" then empty else error
19241924
19251925
jq has a syntax for named lexical labels to "break" or "go (back) to":
19261926

Diff for: docs/content/manual/v1.6/manual.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,7 @@ sections:
21662166
# Repeat an expression until it raises "break" as an
21672167
# error, then stop repeating without re-raising the error.
21682168
# But if the error caught is not "break" then re-raise it.
2169-
try repeat(exp) catch .=="break" then empty else error;
2169+
try repeat(exp) catch if .=="break" then empty else error
21702170
21712171
jq has a syntax for named lexical labels to "break" or "go (back) to":
21722172

0 commit comments

Comments
 (0)