[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert), do
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert), doc/texinfo.texi (Conventions, in @ignore block): keep form feeds in empty_spaces_after_close_brace only among ignored spaces. |
Date: |
Tue, 30 Aug 2022 10:08:29 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 03752a334e * tp/Texinfo/Convert/Plaintext.pm (_convert),
doc/texinfo.texi (Conventions, in @ignore block): keep form feeds in
empty_spaces_after_close_brace only among ignored spaces.
03752a334e is described below
commit 03752a334ec4d981d529216c4fa1a45d46b0021f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Aug 30 16:08:12 2022 +0200
* tp/Texinfo/Convert/Plaintext.pm (_convert),
doc/texinfo.texi (Conventions, in @ignore block):
keep form feeds in empty_spaces_after_close_brace only among
ignored spaces.
---
ChangeLog | 7 +++++++
doc/texinfo.texi | 7 ++++---
tp/TODO | 2 --
tp/Texinfo/Convert/Plaintext.pm | 5 ++++-
tp/t/results/converters_tests/form_feeds.pl | 2 +-
tp/t/results/coverage_braces/form_feed_in_brace_commands.pl | 2 +-
6 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 85634d3fb1..d76e883ef4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-08-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Plaintext.pm (_convert),
+ doc/texinfo.texi (Conventions, in @ignore block):
+ keep form feeds in empty_spaces_after_close_brace only among
+ ignored spaces.
+
2022-08-30 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/TexinfoXML.pm (_end_line_spaces): protect
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index f74d0324ad..5c61ab39d2 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -1441,9 +1441,10 @@ in the output otherwise.
@c Written as @code{\par@{@}}, a @LaTeX{} macro that starts a paragraph.
@item Info
-Output as-is between paragraphs (their most common use); in other
-contexts, they may be treated as regular spaces (and thus consolidated
-with surrounding whitespace).
+Output as-is between paragraphs (their most common use); ignored in contexts
+where spaces are ignored except after specific commands closing braces
+(@code{@@caption} for example). In other contexts, they may be treated as
+regular spaces (and thus consolidated with surrounding whitespace).
@item HTML
Written as a numeric entity except contexts where spaces are ignored;
diff --git a/tp/TODO b/tp/TODO
index 4a85dbb023..46d82eccff 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,8 +13,6 @@ Before next release
Bugs
====
-form feeds results
-
HTML API
========
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index e4f717be59..09ee48c231 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1580,7 +1580,10 @@ sub _convert($$)
if ($type and $self->{'ignorable_space_types'}->{$type}
and ($type ne 'empty_spaces_before_paragraph'
or $self->get_conf('paragraphindent') ne 'asis')) {
- if ($element->{'text'} =~ /\f/) {
+ if ($type eq 'empty_spaces_after_close_brace'
+ and $element->{'text'} =~ /\f/) {
+ # FIXME also in empty_spaces_before_paragraph? Does not seems to be
+ # relevant to keep form feeds in other ignorable spaces.
$result = _get_form_feeds($element->{'text'});
}
add_text_count($self, $result);
diff --git a/tp/t/results/converters_tests/form_feeds.pl
b/tp/t/results/converters_tests/form_feeds.pl
index 4cee86a2cc..7830ca7b44 100644
--- a/tp/t/results/converters_tests/form_feeds.pl
+++ b/tp/t/results/converters_tests/form_feeds.pl
@@ -1208,7 +1208,7 @@ $result_converted{'plaintext'}->{'form_feeds'} = 'aa
*Note firstnode::
- in example
+ in example
around center
in center
diff --git a/tp/t/results/coverage_braces/form_feed_in_brace_commands.pl
b/tp/t/results/coverage_braces/form_feed_in_brace_commands.pl
index e42712f313..42c82b808b 100644
--- a/tp/t/results/coverage_braces/form_feed_in_brace_commands.pl
+++ b/tp/t/results/coverage_braces/form_feed_in_brace_commands.pl
@@ -291,7 +291,7 @@
$result_converted{'plaintext'}->{'form_feed_in_brace_commands'} = '‘ aa’
---------- Footnotes ----------
- (1) f1
+ (1) f1
(2) gg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert), doc/texinfo.texi (Conventions, in @ignore block): keep form feeds in empty_spaces_after_close_brace only among ignored spaces.,
Patrice Dumas <=