2

When using Minted to highlight a PL/pgSQL script, I get following error:

TypeError: 'NoneType' object has no attribute '__getitem__'
(File '%pythonpath%/scripts/pygments/formatters/latex.py', line 133, in _get_ttype_name)

So I tried to use the PostgresLexer, but when trying to compile, this gives errors because square brackets aren't properly escaped:

\begin{minted}[fontsize=\footnotesize,frame=single]{postgresql}
-- Function: dist_calc(bigint[])
-- DROP FUNCTION dist_calc(bigint[]);

CREATE OR REPLACE FUNCTION dist_calc(nodes_array bigint[])
RETURNS double precision AS
$BODY$
DECLARE
geom_1 RECORD;
...
\end{minted}

Is there a solution for the plpgsql lexer, or is there another lexer I could use to format

0 Answers0