[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Info.pm (format_image): fix
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Info.pm (format_image): fix count of lines returned when there is an image text file. |
Date: |
Fri, 23 Dec 2022 17:35:33 -0500 |
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 a7693e1bb6 * tp/Texinfo/Convert/Info.pm (format_image): fix count of
lines returned when there is an image text file.
a7693e1bb6 is described below
commit a7693e1bb685fe67319234e49e8453deb0405e4a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 23 23:35:23 2022 +0100
* tp/Texinfo/Convert/Info.pm (format_image): fix count of lines
returned when there is an image text file.
---
ChangeLog | 5 +
tp/TODO | 6 -
tp/Texinfo/Convert/Info.pm | 6 +-
tp/t/results/indices/image_lines_count.pl | Bin 7139 -> 7139 bytes
.../info_tests/multiline_image_and_align.pl | 4 +-
.../res_parser/formatting_info/formatting.info | 796 ++++++++++-----------
.../formatting.info | 796 ++++++++++-----------
7 files changed, 806 insertions(+), 807 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 396edb526a..803662d147 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-23 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Info.pm (format_image): fix count of lines
+ returned when there is an image text file.
+
2022-12-23 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Info.pm (format_image): avoid warnings about
diff --git a/tp/TODO b/tp/TODO
index f2c5616a89..d68ff237f2 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,12 +13,6 @@ Before next release
Bugs
====
-wrong index lines in printindex
-info tests/layout//out_parser/formatting_info/formatting.info
-for example
-* " <1>: chapter. (line 701)
-is 5 or 6 lines before the index @-command.
-
HTML API
========
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 7e419b2cc1..0a0ff1c5d2 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -600,12 +600,12 @@ sub format_image($$)
if ($self->{'formatters'}->[-1]->{'_top_formatter'}) {
$result .= "\n";
}
- my $image_lines_count = ($result =~ tr/\n/\n/) +1;
- $self->add_image($element, $image_lines_count, $width, 1);
+ $lines_count = ($result =~ tr/\n/\n/);
+ $self->add_image($element, $lines_count +1, $width, 1);
} else {
$result = $self->image_formatted_text($element, $basefile, $text);
$lines_count = ($result =~ tr/\n/\n/);
- $self->add_image($element, $lines_count+1, $width);
+ $self->add_image($element, $lines_count +1, $width);
}
return ($result, $lines_count);
}
diff --git a/tp/t/results/indices/image_lines_count.pl
b/tp/t/results/indices/image_lines_count.pl
index bff86fc7ef..25d8be394c 100644
Binary files a/tp/t/results/indices/image_lines_count.pl and
b/tp/t/results/indices/image_lines_count.pl differ
diff --git a/tp/t/results/info_tests/multiline_image_and_align.pl
b/tp/t/results/info_tests/multiline_image_and_align.pl
index 82b25fc331..320045e3f6 100644
--- a/tp/t/results/info_tests/multiline_image_and_align.pl
+++ b/tp/t/results/info_tests/multiline_image_and_align.pl
@@ -1137,8 +1137,8 @@ dddd [image src="figure.txt" text=" 1 A B
BBB [image src="figure.txt" text=" 1 A B
2 C D
3 E F"