[openssh-commits] [openssh] branch master updated: mdoc2man: balance nested square brackets
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Nov 28 19:21:39 AEDT 2024
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new 74d70841 mdoc2man: balance nested square brackets
74d70841 is described below
commit 74d70841efbf41b9fcc8e6f6f4777d2e9d7e2004
Author: Arnout Engelen <arnout at bzzt.net>
AuthorDate: Fri Oct 18 13:42:38 2024 +0200
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 <arnout at bzzt.net>
---
mdoc2man.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mdoc2man.awk b/mdoc2man.awk
index d393ae6f..02a04f76 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -239,7 +239,7 @@ function add(str) {
while(w<nwords&&match(words[w+1],"^[\\.,:;)]"))
add(words[++w])
} else if(match(words[w],"^Op$")) {
- option=1
+ option++
if(!nospace)
nospace=1
add("[")
@@ -358,7 +358,7 @@ function add(str) {
add(")")
if(angles)
add(">")
- if(option)
+ for(;option;option--)
add("]")
if(ext&&!extopt&&!match(line," $"))
add(OFS)
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list