diff options
author | itchyny <itchyny@cybozu.co.jp> | 2023-06-06 09:03:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 09:03:25 +0900 |
commit | b8816caf0a7f58c6483f4344e222a6fea47732e8 (patch) | |
tree | 9abf2b67a3892183f5039050eca954450c213d37 | |
parent | df8ee8dd7984834edc22af177842efb6cc021e77 (diff) |
docs: Fix a try-catch example (fix #1558, #1777) (#2605)
-rw-r--r-- | docs/content/manual/manual.yml | 2 | ||||
-rw-r--r-- | docs/content/manual/v1.5/manual.yml | 2 | ||||
-rw-r--r-- | docs/content/manual/v1.6/manual.yml | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml index a6d67982..b823c41a 100644 --- a/docs/content/manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -2259,7 +2259,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": diff --git a/docs/content/manual/v1.5/manual.yml b/docs/content/manual/v1.5/manual.yml index 5a0180f6..f4e2a808 100644 --- a/docs/content/manual/v1.5/manual.yml +++ b/docs/content/manual/v1.5/manual.yml @@ -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": diff --git a/docs/content/manual/v1.6/manual.yml b/docs/content/manual/v1.6/manual.yml index 54feeca3..7e62adeb 100644 --- a/docs/content/manual/v1.6/manual.yml +++ b/docs/content/manual/v1.6/manual.yml @@ -2166,7 +2166,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": |