[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/12: [man]: Handle another case of ill-formed input.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/12: [man]: Handle another case of ill-formed input. |
Date: |
Sat, 3 Feb 2024 00:04:02 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 594bd1979d1151ad53db37e8c4c0eb11627ad3f0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 2 13:59:55 2024 -0600
[man]: Handle another case of ill-formed input.
* tmac/an.tmac (TH): Set up end macro unconditionally here...
(an-set-up-continuous-rendering): ...instead of here.
* tmac/tests/an_TP-works.sh: Add test case for the specimen of
ill-formed input that the foregoing remedies (ending input with a
pending input line trap and continuous rendering disabled).
---
ChangeLog | 9 +++++++++
tmac/an.tmac | 2 +-
tmac/tests/an_TP-works.sh | 9 ++++++++-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f284f4f08..781ef88e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-02-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/an.tmac (TH): Set up end macro unconditionally here...
+ (an-set-up-continuous-rendering): ...instead of here.
+
+ * tmac/tests/an_TP-works.sh: Add test case for the specimen of
+ ill-formed input that the foregoing remedies (ending input with
+ a pending input line trap and continuous rendering disabled).
+
2024-02-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/env.cpp (print_hyphenation_exceptions): Flush
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 1e48b3c95..4679a03b2 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -147,7 +147,6 @@
. rn bp an-real-bp
. rn an-ne ne
. rn an-bp bp
-. em an-end
..
.
.de an*reset-hyphenation-mode
@@ -381,6 +380,7 @@
. \}
. \}
.
+. em an-end
. nr an*need-titles-reset 1
..
.
diff --git a/tmac/tests/an_TP-works.sh b/tmac/tests/an_TP-works.sh
index 5623b3b27..90739055a 100755
--- a/tmac/tests/an_TP-works.sh
+++ b/tmac/tests/an_TP-works.sh
@@ -51,7 +51,14 @@ echo "$output" | grep -Eq 'tag +ordinary tagged paragraph'
|| wail
echo "checking ill-formed tagged paragraph" >&2
echo "$output" | grep -q 'ill-formed but still renderable' || wail
-echo "checking paragraph tag dangling at end of document" >&2
+echo "checking paragraph tag dangling at end of document (-rcR=1)" >&2
+echo "$output" | grep -q 'foobar' || wail
+
+output=$(printf "%s" "$input" \
+ | "$groff" -ww -Tascii -P-cbou -rcR=0 -man)
+echo "$output"
+
+echo "checking paragraph tag dangling at end of document (-rcR=0)" >&2
echo "$output" | grep -q 'foobar' || wail
test -z "$fail"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/12: [man]: Handle another case of ill-formed input.,
G. Branden Robinson <=