diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-01-10 15:57:46 +0100 |
---|---|---|
committer | Michael Kerrisk (man-pages) <mtk.manpages@gmail.com> | 2021-01-20 09:53:59 +0100 |
commit | ce17d65a69a1ab4d38905aadb23c579da98186eb (patch) | |
tree | cffbcb8f811d8f2f3e72d47ff9ebe6b8ac427c19 | |
parent | f94759d066f04a6b6d80ce09a1a3fb34c6c3eda1 (diff) |
posix.py: ffix: Correctly format URIs
$ man 7 uri 2>/dev/null \
|sed -n '/Writing a URI/,/^$/p';
Writing a URI
When written, URIs should be placed inside double quotes
(e.g., "http://www.kernel.org"), enclosed in angle brack‐
ets (e.g., <http://lwn.net>), or placed on a line by
themselves. A warning for those who use double-quotes:
never move extraneous punctuation (such as the period
ending a sentence or the comma in a list) inside a URI,
since this will change the value of the URI. Instead,
use angle brackets instead, or switch to a quoting system
that never includes extraneous characters inside quota‐
tion marks. This latter system, called the 'new' or
'logical' quoting system by "Hart's Rules" and the "Ox‐
ford Dictionary for Writers and Editors", is preferred
practice in Great Britain and hackers worldwide (see the
Jargon File's section on Hacker Writing Style,
⟨http://www.fwi.uva.nl/~mes/jargon/h
/HackerWritingStyle.html⟩, for more information). Older
documents suggested inserting the prefix "URL:" just be‐
fore the URI, but this form has never caught on.
Enclose URIs in .UR/.UE,
which encloses the URIs in between <> (or similar characters).
It is especially important in this case,
as the URIs are followed by '.'.
This also fixes the extraneous space that was used to
separate the URIs from the final period.
In some cases, the period ended in a line of its own.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
-rwxr-xr-x | posix.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -337,14 +337,16 @@ for file in sys.argv[2:]: "Electrical and Electronics Engineers, Inc and The Open Group.\n" "In the event of any discrepancy between this version and the original IEEE and\n" "The Open Group Standard, the original IEEE and The Open Group Standard\n" - "is the referee document. The original Standard can be obtained online at\n" - "http://www.opengroup.org/unix/online.html .\n" + "is the referee document. The original Standard can be obtained online at\n" + ".UR http://www.opengroup.org/unix/online.html\n" + ".UE .\n" ".PP\n" "Any typographical or formatting errors that appear\n" "in this page are most likely\n" "to have been introduced during the conversion of the source files to\n" - "man page format. To report such errors, see\n" - "https://www.kernel.org/doc/man-pages/reporting_bugs.html .\n" + "man page format. To report such errors, see\n" + ".UR https://www.kernel.org/doc/man-pages/reporting_bugs.html\n" + ".UE .\n" ) text = "".join(lines) |