gpoore / minted

minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.
1.73k stars 125 forks source link

JSX highlighting is not working in overleaf #383

Open skittlesaur opened 6 months ago

skittlesaur commented 6 months ago

Even though it's supported in Pygments lexers, it doesn't seem to be working in overleaf.

I tried the following:

\begin{minted}{jsx}
const Component = () => {
  return <div>test</div>
}
\end{minted}
muzimuzhi commented 6 months ago

JSX lexer is supported since pygments v2.17.0 (2023-11-18), while Overleaf still uses pygments v2.11.2 (2022-01-06).

Run following example on Overleaf, using its TeX Live 2023 mirror, and you'll get "Pygments version 2.11.2, ...". To run it locally, you need to enable shell escape.

\documentclass{article}

\begin{document}
\input|"pygmentize -V"
\end{document}