groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: tmac/strip.sed: Remove nilpotent capture.


From: G. Branden Robinson
Subject: [groff] 01/01: tmac/strip.sed: Remove nilpotent capture.
Date: Tue, 7 Nov 2017 14:28:19 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit ae59ee569eb5cddab8bdf12a8009bd1b907a8205
Author: G. Branden Robinson <address@hidden>
Date:   Tue Nov 7 14:23:39 2017 -0500

    tmac/strip.sed: Remove nilpotent capture.
    
    Captures are useless if not backreferenced.  And in this case,
    potentially confusing because the substitution match pattern also
    performs a capture.
    
    Signed-off-by: G. Branden Robinson <address@hidden>
---
 ChangeLog      | 4 ++++
 tmac/strip.sed | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 01be7e3..b71d87d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-07  G. Branden Robinson <address@hidden>
+
+       tmac/strip.sed: Remove nilpotent capture from address.
+
 2017-11-05  Bertrand Garrigues <address@hidden>
 
        `preconv': fix usage of lib `uchardet'.
diff --git a/tmac/strip.sed b/tmac/strip.sed
index 1aa778d..e52f93f 100644
--- a/tmac/strip.sed
+++ b/tmac/strip.sed
@@ -8,8 +8,8 @@
   s/^\\#.*/./
   s/\\".*/\\"/
   s/\\#.*/\\/
-  /\(.[ad]s\)/!s/[      ]*\\"//
-  /\(.[ad]s\)/s/\([^    ]*\)\\"/\1/
+  /.[ad]s/!s/[  ]*\\"//
+  /.[ad]s/s/\([^        ]*\)\\"/\1/
   s/\([^/]\)doc-/\1/g
 }
 /^\.$/d



reply via email to

[Prev in Thread] Current Thread [Next in Thread]