From: Arnout Engelen Date: Fri, 18 Oct 2024 11:42:38 +0000 (+0200) Subject: mdoc2man: balance nested square brackets X-Git-Tag: V_10_0_P1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d70841efbf41b9fcc8e6f6f4777d2e9d7e2004;p=thirdparty%2Fopenssh-portable.git mdoc2man: balance nested square brackets I noticed the square brackets in `destination [command [argument...]` in the synopsis for the `ssh.1` manpage were not balanced, this balances them. Signed-off-by: Arnout Engelen --- diff --git a/mdoc2man.awk b/mdoc2man.awk index d393ae6f1..02a04f762 100644 --- a/mdoc2man.awk +++ b/mdoc2man.awk @@ -239,7 +239,7 @@ function add(str) { while(w") - if(option) + for(;option;option--) add("]") if(ext&&!extopt&&!match(line," $")) add(OFS)