groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/03: [sboxes]: Improve notquine.sed portability.


From: G. Branden Robinson
Subject: [groff] 02/03: [sboxes]: Improve notquine.sed portability.
Date: Wed, 27 Oct 2021 00:30:30 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 91e44e4f0544cd8ab4def74514074e4c22ecec33
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Oct 27 00:18:48 2021 +1100

    [sboxes]: Improve notquine.sed portability.
    
    * notquine.sed: Improve portability and tighten logic.  Thanks to Axel
      Kielhorn for the report and Andreas Kusalananda Kähäri for the
      suggested improvements.
    
    Also break injected groff text lines at sentence boundaries.  Also fix
    formatting of previous ChangeLog entry.
---
 contrib/sboxes/ChangeLog    | 17 +++++++++++------
 contrib/sboxes/notquine.sed | 14 +++++++-------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index 217eb33..ae848cc 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -1,12 +1,17 @@
+2021-10-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * notquine.sed: Improve portability and tighten logic.  Thanks
+       to Axel Kielhorn for the report and Andreas Kusalananda Kähäri
+       for the suggested improvements.
+
 2021-10-24  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * sboxes.tmac: Rename strings and macro I introduced so that
-         they fit Deri's selection within the name space (prefix "bx").
-         Rename existing macros to use the groff ms(7) naming
-         convention.  None of the macros in this "module" seem meant to
-         be visible to other modules, so suffix the module name with
-         '*' instead of '@'.  Drop unused 7th argument in a
-         `pdfbackground` call.
+       they fit Deri's selection within the name space (prefix "bx").
+       Rename existing macros to use the groff ms(7) naming convention.
+       None of the macros in this "module" seem meant to be visible to
+       other modules, so suffix the module name with '*' instead of
+       '@'.  Drop unused 7th argument in a `pdfbackground` call.
 
 2021-10-24  G. Branden Robinson <g.branden.robinson@gmail.com>
 
diff --git a/contrib/sboxes/notquine.sed b/contrib/sboxes/notquine.sed
index 248d50a..6c591d0 100644
--- a/contrib/sboxes/notquine.sed
+++ b/contrib/sboxes/notquine.sed
@@ -1,17 +1,17 @@
+s/.*\\##.*/&\
+&/
+s/\\##//
+t
 s/\\" FOOTNOTE/@FOOTNOTE@/
-s/.*\\##.*/&\n&/
-/\\##/{
-  s/\\##//
-  b}
 s/\\/\\[rs]/g
 s/-/\\&/g
 s/'/\\[aq]/g
 s/^\./\\\&&/
 /@FOOTNOTE@/a\
 .FS\
-This is just a long footnote. Its purpose is only to check that the\
-bottom of the box on this page has been adjusted because of the size\
-of the footnote.\
+This is just a long footnote.\
+Its purpose is only to check that the bottom of the box on this page\
+has been adjusted because of the size of the footnote.\
 .FE
 s/@FOOTNOTE@/\\m[red]\\**\\m[]/
 s/REPLACEME/(replaced by source of this document)/



reply via email to

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