[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/03: makevarescape.sed: Add breakpoints, spaces, and ".
From: |
G. Branden Robinson |
Subject: |
[groff] 02/03: makevarescape.sed: Add breakpoints, spaces, and ". |
Date: |
Mon, 12 Nov 2018 12:50:03 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit ea32b7d0462813fc3e7c423efb6d805273df9edd
Author: G. Branden Robinson <address@hidden>
Date: Mon Nov 12 12:02:31 2018 -0500
makevarescape.sed: Add breakpoints, spaces, and ".
* makevarescape.sed:
+ Escape plain spaces and double-quotes (ASCII 32 and 34) so
that bad things don't happen if they are embedded in a Make
variable expanded in a man page @THUS@ _and_ given as an
argument to a macro that distinguishes its parameters, such
as .IR.
+ Add discretionary breaks after groups of slashes not
preceded by a space; e.g., transform "/usr/bin/groff" into
"/usr/\:bin/\:groff". Will also work on URLs
("https://\:example.com/\:page.html") in case we need that.
Signed-off-by: G. Branden Robinson <address@hidden>
---
ChangeLog | 13 +++++++++++++
makevarescape.sed | 3 +++
2 files changed, 16 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 39204cf..b8fc025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2018-11-12 G. Branden Robinson <address@hidden>
+
+ * makevarescape.sed:
+ - Escape plain spaces and double-quotes (ASCII 32 and 34) so
+ that bad things don't happen if they are embedded in a Make
+ variable expanded in a man page @THUS@ _and_ given as an
+ argument to a macro that distinguishes its parameters, such
+ as .IR.
+ - Add discretionary breaks after groups of slashes not
+ preceded by a space; e.g., transform "/usr/bin/groff" into
+ "/usr/\:bin/\:groff". Will also work on URLs
+ {"https://\:example.com/\:page.html"} in case we need that.
+
2018-11-11 G. Branden Robinson <address@hidden>
Undocument Werner and Ted as groff maintainers.
diff --git a/makevarescape.sed b/makevarescape.sed
index 54f5513..8ece3e8 100644
--- a/makevarescape.sed
+++ b/makevarescape.sed
@@ -1,6 +1,9 @@
s/\\/\\\\e/g
+s/ /\\\\ /g
+s/"/\\\\(dq/g
s/'/\\\\(aq/g
s/-/\\\\&/g
s/\^/\\\\(ha/g
s/`/\\\\(ga/g
s/~/\\\\(ti/g
+s|[^ ]/\+|&\\\\:|g
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/03: makevarescape.sed: Add breakpoints, spaces, and ".,
G. Branden Robinson <=