On Sat, Sep 13, 2025 at 11:28:56PM +0100, Gavin Smith wrote:
> On Sat, Sep 13, 2025 at 05:48:30PM +0100, Gavin Smith wrote:
> > * The language name mapping is extremely rudimentary:
> >
> > my %highlight_type_languages_name_mappings = (
> > 'source-highlight' => {
> > 'C++' => 'C',
> > 'Perl' => 'perl',
> > },
> > 'highlight' => {
> > 'C++' => 'c++',
> > },
> > 'pygments' => {
> > 'C++' => 'c++',
> > }
> > );
> >
> > Is this useful or necessary for us to maintain on a program-by-program
> > basis?
>
> Here's what I propose about "language name mapping". There are two
> possibilities:
>
> * Basic: The argument on the @example line (or value of
> HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE) is used directly in the call to the
> syntax highlighting program. This would require the user changing e.g.
> "@example C++" to "@example c++" or "@example C" - not a big deal at all.
The main issue I saw with that possibility is that the different
highlighting programs may not have common names for programming
languages. This is not really the case for c++, as cpp can be used for all
of them. So I would suggest removing the mappings for now, changing the
test instead and waiting for reports to re-add mappings if needed.
--
Pat