-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
man node
produces warnings on macOS
#18434
Comments
I think this is because of the two |
man node
produces warningsman node
produces warnings on macOS
:( no idea about the archaic markup honestly but will have a look. Thanks for raising the issue and CCing me. |
👍 if it helps, troff 1.22.3 on Linux seems unaffected by this. Also the specific section with the |
It's the diff --git a/doc/node.1 b/doc/node.1
index a4395c099b..836b901bea 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -37,9 +37,9 @@ node \- Server-side JavaScript runtime
.RI [ script.js \ |
.B -e
.RI \&" script \&"
-.R |
+.RI |
.B -
-.R ]
+.RI ]
.B [--]
.RI [ arguments ]
.br |
Thanks ben, that patch supresses the warnings for me. |
In Roff, a string register can be expanded using the same syntax for invoking a macro or function call: .ds JS "JavaScript" \" Define string `JS`
.as JS " kicks ass!" \" Append to string `JS`
.
.JS \" Outputs "JavaScript kicks ass!" Macros/functions operate in a similar fashion: .\" Define macro named `JS`
.de JS
JavaScript \\$1 \\$2
..
.
.JS kicks ass! The former usage is rare; in almost all cases, Roff authors will use the following syntax for expanding a string: \*X \" Expands string with 1-letter name X
\*(XY \" Expands string with 2-letter name XY
\*[XYZ] \" Expands string with variable-length name (GNU extension) Now, it's pretty silly to have a macro that applies the default font, which is why .de1 R
\c
. ie \\n[.$] \{\
. tm `R' is a string (producing the registered sign), not a macro.
. nop \\$*
. \}
. el \{\
. ie c\[rg] \
. nop \[rg]\c
. el \
. nop (Reg.)\c
. \}
.. And here's the macro's rough approximation in JavaScript: function R (...args) {
if (arguments.length) {
console.warn("`R' is a string (producing the registered sign), not a macro.");
process.stdout.write(...args);
}
else {
if(characters.has("RG"))
process.stdout.write(characters.get("RG"));
else
process.stdout.write("(Reg.)");
}
} |
It might be a good idea run |
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: nodejs#18434 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
On macOS 10.13.3 with node 9.4.0, I get these warnings printed after opening and closing node's manpage via
man node
and q:Versions of tools involved in
man
processing:# groff --version GNU troff (groff) version 1.19.2 GNU grops (groff) version 1.19.2
The text was updated successfully, but these errors were encountered: