Add highlighting to last code-block

John Gardner
2021-12-22 20:00:38 +11:00
parent 1f4b2671d1
commit cc5ef61849

@@ -32,8 +32,10 @@ If you are trying to do something else, look up the syntax for what you are tryi
POSIX allows the body of a function to be any compound command, e.g. `foo() for i; do :; done`. Since this usage is rare, ShellCheck intentionally requires the body to be `{ ..; }` (or `( ..; )`):
foo() {
for i; do :; done
}
```sh
foo() {
for i; do :; done
}
```
This additional structure requirement helps improve error messages and suggestions by not parsing down a path that less advanced users wouldn't expect.