From: Arnout Engelen Date: Fri, 20 Jun 2025 19:36:44 +0000 (+0200) Subject: mdoc2man: support `Ns` inside `Ic` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45e2d8861bb724cfced1bf0693a6418a0cba6ab2;p=thirdparty%2Fopenssh-portable.git mdoc2man: support `Ns` inside `Ic` When encountering an `Ns` mdoc macro ('no space') inside an `Ic` block ('command'), such as for 'lines=number' in ssh-keygen.1, `mdoc2man` just output the macro instead of processing it. This adds processing for `Ns` when seen inside an `Ic` block. --- diff --git a/mdoc2man.awk b/mdoc2man.awk index 02a04f762..469891965 100644 --- a/mdoc2man.awk +++ b/mdoc2man.awk @@ -281,6 +281,12 @@ function add(str) { add("[") words[nwords]=words[nwords] "]" } + if(match(words[w],"^Ns$")) { + w++ + if(!nospace) + nospace=1 + sub(" $","",line) + } if(match(words[w],"^Ar$")) { add("\\fI" words[++w] "\\fP") } else if(match(words[w],"^[\\.,]")) {