From 74d70841efbf41b9fcc8e6f6f4777d2e9d7e2004 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Fri, 18 Oct 2024 13:42:38 +0200 Subject: [PATCH] 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 --- mdoc2man.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)