[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Info.pm (format_warn_strong_
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Info.pm (format_warn_strong_note), tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert): add format_warn_strong_note methods to Plaintext.pm and Info.pm to determine if Note in @strong requires a warning, instead of using 'converted_format'. That way it is certain that it is a property of the Converter. |
Date: |
Sat, 05 Oct 2024 05:19:55 -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 c739af0c0d * tp/Texinfo/Convert/Info.pm (format_warn_strong_note),
tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert): add
format_warn_strong_note methods to Plaintext.pm and Info.pm to determine if
Note in @strong requires a warning, instead of using 'converted_format'. That
way it is certain that it is a property of the Converter.
c739af0c0d is described below
commit c739af0c0d872ff3d767c183d061c5b3f793b21d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 24 23:08:36 2024 +0200
* tp/Texinfo/Convert/Info.pm (format_warn_strong_note),
tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert):
add format_warn_strong_note methods to Plaintext.pm and Info.pm to
determine if Note in @strong requires a warning, instead of using
'converted_format'. That way it is certain that it is a property of
the Converter.
---
ChangeLog | 9 +++++++++
tp/TODO | 1 -
tp/Texinfo/Convert/Converter.pm | 2 ++
tp/Texinfo/Convert/Info.pm | 5 +++++
tp/Texinfo/Convert/Plaintext.pm | 8 ++++++--
5 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5bdcf348fb..c0bc82eda0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-24 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Info.pm (format_warn_strong_note),
+ tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert):
+ add format_warn_strong_note methods to Plaintext.pm and Info.pm to
+ determine if Note in @strong requires a warning, instead of using
+ 'converted_format'. That way it is certain that it is a property of
+ the Converter.
+
2024-08-24 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/get_perl_info.c (get_sv_options): inline
diff --git a/tp/TODO b/tp/TODO
index 1dc935162a..acb6fb0c7e 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -756,7 +756,6 @@ make dist
tar xvf texinfo-7.*.*.tar.gz
diff -u -r ../in_source_dist_contents/texinfo-7.*.*/ texinfo-7.*.*/ >
../build_in_out_source_differences.diff
-
Test validity of Texinfo XML or docbook
export XML_CATALOG_FILES=~/src/texinfo/tp/maintain/catalog.xml
xmllint --nonet --noout --valid commands.xml
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index b11000c27d..d68555db15 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -550,6 +550,7 @@ sub get_conf($$)
confess("CBUG: unknown option $conf\n");
#return undef;
}
+
return $self->{'conf'}->{$conf};
}
@@ -577,6 +578,7 @@ sub force_conf($$$)
my $self = shift;
my $conf = shift;
my $value = shift;
+
if (!Texinfo::Common::valid_customization_option($conf)) {
die "BUG: force_conf: unknown option $conf\n";
return undef;
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 561c26d7cb..9e333df44c 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -479,6 +479,11 @@ sub _info_header($$$)
return $result;
}
+sub format_warn_strong_note($)
+{
+ return 1;
+}
+
sub format_contents($$$)
{
my $self = shift;
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 8658cba3a9..05a7f592fe 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1503,6 +1503,11 @@ sub _align_environment($$$$)
return $result;
}
+sub format_warn_strong_note($)
+{
+ return 0;
+}
+
# format @contents or @shortcontents
sub format_contents($$$)
{
@@ -2912,8 +2917,7 @@ sub _convert($$)
and defined($element->{'args'}->[0]->{'contents'}->[0]->{'text'})
and $element->{'args'}->[0]->{'contents'}->[0]->{'text'}
=~ /^Note\s/i
- and $self->{'converted_format'}
- and $self->{'converted_format'} eq 'info') {
+ and $self->format_warn_strong_note()) {
$self->plaintext_line_warn($self, __(
"\@strong{Note...} produces a spurious cross-reference in Info; reword
to avoid that"),
$element->{'source_info'});
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Info.pm (format_warn_strong_note), tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert): add format_warn_strong_note methods to Plaintext.pm and Info.pm to determine if Note in @strong requires a warning, instead of using 'converted_format'. That way it is certain that it is a property of the Converter.,
Patrice Dumas <=