[openssh-commits] [openssh] 03/04: mdoc2man: support `Ns` inside `Ic`

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Oct 14 18:53:28 AEDT 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 45e2d8861bb724cfced1bf0693a6418a0cba6ab2
Author: Arnout Engelen <arnout at bzzt.net>
AuthorDate: Fri Jun 20 21:36:44 2025 +0200

    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.
---
 mdoc2man.awk | 6 ++++++
 1 file changed, 6 insertions(+)

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],"^[\\.,]")) {

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list