docs: Fix a try-catch example (fix #1558, #1777) (#2605)

This commit is contained in:
itchyny authored and GitHub committed 2023-06-06 09:03:25 +09:00
1 parent df8ee8dd79
commit b8816caf0a
3 files changed
+3 -3

No files matched your search

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