[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Sat, 21 Oct 2023 07:50:16 -0400 (EDT) |
branch: master
commit 7407936b8ebcaca727d14c81885ee1df35655cc5
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Oct 21 12:47:12 2023 +0100
* tp/Texinfo/Convert/Plaintext.pm (_convert): Move a block
of code to make it clearer that the result of _protect_sentence_ends
is only passed to add_text, not add_next.
---
ChangeLog | 6 ++++++
tp/Texinfo/Convert/Plaintext.pm | 16 ++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ee85f44df9..8c0c536749 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-21 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Convert/Plaintext.pm (_convert): Move a block
+ of code to make it clearer that the result of _protect_sentence_ends
+ is only passed to add_text, not add_next.
+
2023-10-21 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS/xspara.c (xspara__add_next): Eliminate code
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index eeec991359..b7eee2710b 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -2383,14 +2383,6 @@ sub _convert($$)
$self->{'convert_text_options'});
}
- # @AA{} should suppress an end sentence, @aa{} shouldn't. This
- # is the case whether we are in @sc or not.
- if ($formatter->{'upper_case_stack'}->[-1]->{'upper_case'}
- and $letter_no_arg_commands{$command}) {
- $text = _protect_sentence_ends($text);
- $text = uc($text);
- }
-
if ($punctuation_no_arg_commands{$command}) {
$result .= _count_added($self, $formatter->{'container'},
add_next($formatter->{'container'}, $text));
@@ -2399,6 +2391,14 @@ sub _convert($$)
$result .= _count_added($self, $formatter->{'container'},
add_next($formatter->{'container'}, $text));
} else {
+ # @AA{} should suppress an end sentence, @aa{} shouldn't. This
+ # is the case whether we are in @sc or not.
+ if ($formatter->{'upper_case_stack'}->[-1]->{'upper_case'}
+ and $letter_no_arg_commands{$command}) {
+ $text = _protect_sentence_ends($text);
+ $text = uc($text);
+ }
+
$result .= _count_added($self, $formatter->{'container'},
add_text($formatter->{'container'}, $text));