fix(doc): correct brace detection (fixes #4739)