Skip to content

Mathematica parsing warnings since 2.20 #3097

Description

@raffienficiaud

Hi pygments team!

Since the update to 2.20, the build of our documentation using Sphinx is generating warnings that were not here in 2.19.2.

The .rst snippet of code is as follow

.. code:: wl

   (* [command] *)

   gap = 7/4 + flagNLOSO*(L^2*(-15/32 - (45*\[Nu])/32))/r^2

and this raises the following warning:

WARNING: Lexing literal_block '(* [command] *)\n\ngap = 7/4 + flagNLOSO*(L^2*(-15/32 - (45*\\[Nu])/32))/r^2' as "wl" resulted in an error at token: '\\'. Retrying in relaxed mode. [misc.highlighting_failure]

The only location I am seeing a \\ is for \\[Nu] which comes from \[Nu] on the original input. The other package we are using is pygments-mathematica. I believe this comes from pygments as the failures started with the release date of 2.20, but I might be completely wrong, please let me know (using sphinx 9.0.4).

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions