[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_fil
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn if the htmlxref.cnf entry URL prefix is missing. |
Date: |
Fri, 19 Apr 2024 06:34:51 -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 77f6df2d0e * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn
if the htmlxref.cnf entry URL prefix is missing.
77f6df2d0e is described below
commit 77f6df2d0e16e6808a0c16fc6f2569c0c20a14f2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Apr 19 12:34:45 2024 +0200
* tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn if the
htmlxref.cnf entry URL prefix is missing.
---
ChangeLog | 5 +++++
tp/Texinfo/Convert/HTML.pm | 7 +++++--
tp/t/results/htmlxref/htmlxref.pl | 8 ++++++++
tp/t/results/htmlxref/htmlxref_nodes.pl | 8 ++++++++
tp/t/results/htmlxref/htmlxref_only_split.pl | 12 ++++++++++++
tp/t/results/htmlxref/htmlxref_only_split_nodes.pl | 12 ++++++++++++
6 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b768359c33..472cb75701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-04-19 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn if the
+ htmlxref.cnf entry URL prefix is missing.
+
2024-04-19 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_close_command_cleanup)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index f314967881..036e643eda 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8589,6 +8589,11 @@ sub _parse_htmlxref_files($$)
next;
}
my $href = shift @htmlxref;
+ if (!defined($href)) {
+ $self->converter_line_warn(sprintf(
+ __("missing %s URL prefix for `%s'"), $split_or_mono, $manual),
+ {'file_name' => $fname, 'line_nr' => $line_nr});
+ }
next if ($htmlxref->{$manual}
and exists($htmlxref->{$manual}->{$split_or_mono}));
@@ -8599,8 +8604,6 @@ sub _parse_htmlxref_files($$)
$href =~ s/\/*$// if ($split_or_mono ne 'mono');
}
$htmlxref->{$manual} = {} if (!$htmlxref->{$manual});
- # $href can be undef if the htmlxref part is missing on the line.
- # TODO warn?
$htmlxref->{$manual}->{$split_or_mono} = $href;
}
if (!close (HTMLXREF)) {
diff --git a/tp/t/results/htmlxref/htmlxref.pl
b/tp/t/results/htmlxref/htmlxref.pl
index 463e68994b..cccebbae78 100644
--- a/tp/t/results/htmlxref/htmlxref.pl
+++ b/tp/t/results/htmlxref/htmlxref.pl
@@ -2915,6 +2915,14 @@ $result_floats{'htmlxref'} = {};
$result_converted_errors{'file_html'}->{'htmlxref'} = [
+ {
+ 'error_line' => 'warning: missing section URL prefix for `manual\'
+',
+ 'file_name' => 'htmlxref.cnf',
+ 'line_nr' => 12,
+ 'text' => 'missing section URL prefix for `manual\'',
+ 'type' => 'warning'
+ },
{
'error_line' => 'warning: unrecognized type: foo
',
diff --git a/tp/t/results/htmlxref/htmlxref_nodes.pl
b/tp/t/results/htmlxref/htmlxref_nodes.pl
index 5f5eeb4a6b..3739f40e15 100644
--- a/tp/t/results/htmlxref/htmlxref_nodes.pl
+++ b/tp/t/results/htmlxref/htmlxref_nodes.pl
@@ -2915,6 +2915,14 @@ $result_floats{'htmlxref_nodes'} = {};
$result_converted_errors{'file_html'}->{'htmlxref_nodes'} = [
+ {
+ 'error_line' => 'warning: missing section URL prefix for `manual\'
+',
+ 'file_name' => 'htmlxref.cnf',
+ 'line_nr' => 12,
+ 'text' => 'missing section URL prefix for `manual\'',
+ 'type' => 'warning'
+ },
{
'error_line' => 'warning: unrecognized type: foo
',
diff --git a/tp/t/results/htmlxref/htmlxref_only_split.pl
b/tp/t/results/htmlxref/htmlxref_only_split.pl
index d873c6f0e0..4d67e76319 100644
--- a/tp/t/results/htmlxref/htmlxref_only_split.pl
+++ b/tp/t/results/htmlxref/htmlxref_only_split.pl
@@ -2914,4 +2914,16 @@ $result_errors{'htmlxref_only_split'} = [];
$result_floats{'htmlxref_only_split'} = {};
+$result_converted_errors{'file_html'}->{'htmlxref_only_split'} = [
+ {
+ 'error_line' => 'warning: missing section URL prefix for `manual\'
+',
+ 'file_name' => 'htmlxref-split.cnf',
+ 'line_nr' => 1,
+ 'text' => 'missing section URL prefix for `manual\'',
+ 'type' => 'warning'
+ }
+];
+
+
1;
diff --git a/tp/t/results/htmlxref/htmlxref_only_split_nodes.pl
b/tp/t/results/htmlxref/htmlxref_only_split_nodes.pl
index a448174321..1816f6d92d 100644
--- a/tp/t/results/htmlxref/htmlxref_only_split_nodes.pl
+++ b/tp/t/results/htmlxref/htmlxref_only_split_nodes.pl
@@ -2914,4 +2914,16 @@ $result_errors{'htmlxref_only_split_nodes'} = [];
$result_floats{'htmlxref_only_split_nodes'} = {};
+$result_converted_errors{'file_html'}->{'htmlxref_only_split_nodes'} = [
+ {
+ 'error_line' => 'warning: missing section URL prefix for `manual\'
+',
+ 'file_name' => 'htmlxref-split.cnf',
+ 'line_nr' => 1,
+ 'text' => 'missing section URL prefix for `manual\'',
+ 'type' => 'warning'
+ }
+];
+
+
1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn if the htmlxref.cnf entry URL prefix is missing.,
Patrice Dumas <=