You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .R warns the user when it detects it's been called as a macro. Here's the macro's actual definition in an.tmac:
.de1R\c
. ie \\n[.$]\{\
. tm `R' is a string (producing the registered sign), not a macro.
. nop \\$*
. \}
. el\{\
. iec\[rg]\
. nop\[rg]\c
. el\
. nop (Reg.)\c
. \}
..
And here's the macro's rough approximation in JavaScript:
functionR(...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"));elseprocess.stdout.write("(Reg.)");}}
It might be a good idea run man ./doc/node.1 > /dev/null during our linter tests and verify that it doesn't print any warnings on stderr (exit code is 0, even with warnings present).
Activity
silverwind commentedon Jan 29, 2018
I think this is because of the two
.Rs introduced here, but not sure what do do about them.[-]`man node` produces warnings[/-][+]`man node` produces warnings on macOS[/+]addaleax commentedon Jan 29, 2018
/cc @ebraminio @Fishrock123
ebraminio commentedon Jan 29, 2018
:( no idea about the archaic markup honestly but will have a look. Thanks for raising the issue and CCing me.
silverwind commentedon Jan 29, 2018
👍 if it helps, troff 1.22.3 on Linux seems unaffected by this. Also the specific section with the
.Rrenders fine on both macOS and Linux for me.bnoordhuis commentedon Jan 29, 2018
It's the
.Rtags that commit introduces. Whether or not it generates warnings depends on whether the system's mandoc macro package defines it.silverwind commentedon Jan 29, 2018
Thanks ben, that patch supresses the warnings for me.
silverwind commentedon Jan 29, 2018
#18440
Alhadis commentedon Feb 3, 2018
In Roff, a string register can be expanded using the same syntax for invoking a macro or function call:
Macros/functions operate in a similar fashion:
The former usage is rare; in almost all cases, Roff authors will use the following syntax for expanding a string:
Now, it's pretty silly to have a macro that applies the default font, which is why
.Rwarns the user when it detects it's been called as a macro. Here's the macro's actual definition inan.tmac:And here's the macro's rough approximation in JavaScript:
silverwind commentedon Feb 4, 2018
It might be a good idea run
man ./doc/node.1 > /dev/nullduring our linter tests and verify that it doesn't print any warnings on stderr (exit code is 0, even with warnings present).doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings
doc: fix manpage warnings