[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Whitespace after @image
From: |
Gavin D. Smith |
Subject: |
branch master updated: Whitespace after @image |
Date: |
Sun, 25 Apr 2021 15:46:37 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 894cf6b Whitespace after @image
894cf6b is described below
commit 894cf6b1f49cd77a2c0e1a8ef8efc8960502268b
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Apr 25 20:46:26 2021 +0100
Whitespace after @image
* tp/Texinfo/Convert/Plaintext.pm (_convert): Output any
top-level whitespace element. This allows a blank line
of whitespace to appear after an @image that is not part
of a paragraph.
* tp/t/05paragraph.t (sole_image): New test.
Report from Werner Lemberg.
---
ChangeLog | 13 +++
tp/Texinfo/Convert/Plaintext.pm | 4 +
tp/t/05paragraph.t | 5 +
tp/t/results/converters_tests/image_extension.pl | 4 +-
tp/t/results/converters_tests/image_formatting.pl | 2 +
tp/t/results/coverage/block_commands.pl | 1 +
.../coverage/punctuation_in_line_commands.pl | 5 +-
tp/t/results/coverage_braces/empty_commands.pl | 3 +-
.../coverage_braces/space_command_in_image.pl | 2 +-
tp/t/results/coverage_braces/test_image.pl | 4 +
tp/t/results/float/anchor_in_caption.pl | 4 +-
tp/t/results/float/cindex_in_caption.pl | 6 +-
tp/t/results/float/complex_float.pl | 3 +
.../float/empty_listoffloats_with_floats.pl | 2 +
tp/t/results/float/float_with_at_commands.pl | 1 +
tp/t/results/float/footnote_in_caption.pl | 4 +-
.../results/float/footnote_in_caption_and_error.pl | 1 +
.../float/numbering_captions_listoffloats.pl | 33 +++++++
tp/t/results/float/simple.pl | 1 +
tp/t/results/indices/image_lines_count.pl | 6 +-
tp/t/results/indices/image_text_lines_count.pl | 6 +-
tp/t/results/info_tests/error_in_footnote.pl | 3 +-
tp/t/results/info_tests/float_long_captions.pl | 4 +-
.../info_tests/image_and_spaces_formatting.pl | 3 +-
tp/t/results/info_tests/image_extension.pl | 3 +
tp/t/results/info_tests/image_not_found.pl | 1 +
tp/t/results/info_tests/image_quotes.pl | Bin 5375 -> 5376 bytes
tp/t/results/info_tests/image_text_encoded.pl | 1 +
tp/t/results/invalid_nestings/table_in_code.pl | 1 +
tp/t/results/paragraph/commands_in_flushright.pl | 1 +
tp/t/results/paragraph/no_paragraph_commands.pl | 5 +-
tp/t/results/paragraph/sole_image.pl | 110 +++++++++++++++++++++
tp/t/results/raw/verbatim_in_brace_command.pl | 1 +
.../sectioning/unnumbered_before_top_node.pl | 1 +
34 files changed, 228 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a7cd66c..d984cfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2021-04-25 Gavin Smith <gavinsmith0123@gmail.com>
+ Whitespace after @image
+
+ * tp/Texinfo/Convert/Plaintext.pm (_convert): Output any
+ top-level whitespace element. This allows a blank line
+ of whitespace to appear after an @image that is not part
+ of a paragraph.
+
+ * tp/t/05paragraph.t (sole_image): New test.
+
+ Report from Werner Lemberg.
+
+2021-04-25 Gavin Smith <gavinsmith0123@gmail.com>
+
* info/nodes.c (get_tags_of_indirect_tags_table):
Free arrays in case of malformed Info file.
Report from Vitezslav Crhonek.
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 4a1df04..14c6f5c 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1574,6 +1574,10 @@ sub _convert($$)
} elsif ($root->{'text'} =~ /\S/) {
$self->_bug_message("ignored text not empty `$root->{'text'}'", $root);
return '';
+ } else {
+ # miscellaneous top-level whitespace - possibly after an @image
+ return _count_added($self, $formatter->{'container'},
+ add_text($formatter->{'container'}, $root->{'text'}));
}
} else {
my $tree = $self->gdt($root->{'text'});
diff --git a/tp/t/05paragraph.t b/tp/t/05paragraph.t
index 59a7f89..239bc67 100644
--- a/tp/t/05paragraph.t
+++ b/tp/t/05paragraph.t
@@ -23,6 +23,11 @@ text l 2
@titlefont{title font}
@image{aa,bb,cc,dd,.ee}
'],
+[ 'sole_image',
+'@image{aa}
+
+next para
+'],
[ 'paragraph_command','@@
@b{aaa}.
diff --git a/tp/t/results/converters_tests/image_extension.pl
b/tp/t/results/converters_tests/image_extension.pl
index 44b8c3e..ef3d8f2 100644
--- a/tp/t/results/converters_tests/image_extension.pl
+++ b/tp/t/results/converters_tests/image_extension.pl
@@ -89,7 +89,8 @@ $result_floats{'image_extension'} = {};
-$result_converted{'plaintext'}->{'image_extension'} = '[f---ile]';
+$result_converted{'plaintext'}->{'image_extension'} = '[f---ile]
+';
$result_converted_errors{'plaintext'}->{'image_extension'} = [
{
@@ -146,6 +147,7 @@ $result_converted_errors{'docbook'}->{'image_extension'} = [
$result_converted{'info'}->{'image_extension'} = 'This is , produced from .
[f---ile]
+
Tag Table:
diff --git a/tp/t/results/converters_tests/image_formatting.pl
b/tp/t/results/converters_tests/image_formatting.pl
index 7483937..0e250f5 100644
--- a/tp/t/results/converters_tests/image_formatting.pl
+++ b/tp/t/results/converters_tests/image_formatting.pl
@@ -2570,6 +2570,7 @@ bbb
ccc
Image description""\\.
+
in para Image description""\\..
';
@@ -2819,6 +2820,7 @@ ccc
[image src="f--ile.png" alt="a very long alt argument that could span more
than one line who knows" text="Image description\\"\\"\\\\."