groff-commit
[Top][All Lists]
Advanced

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

[groff] 07/15: tmac/an.tmac (an-end): Call `an-input-trap`.


From: G. Branden Robinson
Subject: [groff] 07/15: tmac/an.tmac (an-end): Call `an-input-trap`.
Date: Thu, 1 Feb 2024 23:45:28 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit c8b496411970aa5db00549162a6bfc4fbfd40763
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Feb 1 16:37:56 2024 -0600

    tmac/an.tmac (an-end): Call `an-input-trap`.
    
    * tmac/an.tmac (an-end): Call `an-input-trap`.  If a document ends with
      an input trap pending, this ensures that any text on the applicable
      input line will be emitted, better accommodating ill-formed documents.
    
    This fixes the failing test case (of ill-formed input) in the previous
    commit and more closely resembles groff <= 1.23.0 and mandoc(1) output.
---
 ChangeLog    | 7 +++++++
 tmac/an.tmac | 1 +
 2 files changed, 8 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f0a6a6f59..1bc519678 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-02-01  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (an-end): Call `an-input-trap`.  If a document
+       ends with an input trap pending, this ensures that any text on
+       the applicable input line will be emitted, better accommodating
+       ill-formed documents.
+
 2024-02-01  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/tests/an_TP-works.sh: Add unit test.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index c173c1764..83c144139 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -110,6 +110,7 @@
 .\" continuous rendering mode.
 .de1 an-end
 .  if !r an-TH-was-called .return
+.  an-input-trap
 .  if \\n[cR] \{\
 .    \" We might have a pending output line that is not yet broken, and
 .    \" also be 1v from the bottom of the page.  If we break (or flush)



reply via email to

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