Hello, The patch looks good to me. A ChangeLog entry is missing, please add one and it will be good to go for me.
On Mon, Nov 25, 2024 at 04:07:07PM +0000, Carlos Maniero wrote: > At this point HIGHLIGHT_SYNTAX is defaulting to source-highlight which > will no longer be the expected result once we start executing unknown > highlighters as commands. > > Signed-off-by: Carlos Maniero <car...@maniero.me> > --- > V2: > - Ensure all lines is under 80 chars > - Print an warning instead of an error > - Keep the warning message shorter. > > Thanks for the feedbacks Patrice! > > tp/ext/highlight_syntax.pm | 5 +++++ > tp/tests/other/list-of-tests | 4 ++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/tp/ext/highlight_syntax.pm b/tp/ext/highlight_syntax.pm > index 953f5c10eb..e03a4feb1c 100644 > --- a/tp/ext/highlight_syntax.pm > +++ b/tp/ext/highlight_syntax.pm > @@ -80,6 +80,11 @@ sub highlight_setup($$) > } elsif (defined($highlight_type) and $highlight_type eq 'pygments') { > $cmd = 'pygmentize -L lexers'; > } else { > + if (defined($highlight_type) and $highlight_type ne 'source-highlight') { > + $self->converter_document_warn(sprintf(__( > + "`%s' is not valid for HIGHLIGHT_SYNTAX. Set to > `source-highlight'?"), > + $highlight_type)); > + } > $highlight_type = 'source-highlight'; > $cmd = 'source-highlight --lang-list'; > } > diff --git a/tp/tests/other/list-of-tests b/tp/tests/other/list-of-tests > index 963befe46b..1a79af0e05 100644 > --- a/tp/tests/other/list-of-tests > +++ b/tp/tests/other/list-of-tests > @@ -1,10 +1,10 @@ > > # syntax highlighting in examples > -highlight_syntax_example highlight_example.texi --html -c HIGHLIGHT_SYNTAX=1 > +highlight_syntax_example highlight_example.texi --html -c > HIGHLIGHT_SYNTAX=source-highlight > highlight_syntax_example_pygments highlight_example.texi --html -c > HIGHLIGHT_SYNTAX=pygments > highlight_syntax_example_highlight highlight_example.texi --html -c > HIGHLIGHT_SYNTAX=highlight > > -highlight_syntax_example_default_language highlight_example.texi --html -c > HIGHLIGHT_SYNTAX=1 -c HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE=Perl > +highlight_syntax_example_default_language highlight_example.texi --html -c > HIGHLIGHT_SYNTAX=source-highlight -c HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE=Perl > > highlight_syntax_example_latin9 highlight_example.texi --html > --init=highlight_syntax.pm -c 'OUTPUT_ENCODING_NAME=ISO-8859-15' > > > base-commit: 49a0d9aa966f2515b6b783db6e9815f044abe849 > -- > 2.46.1 > >