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

closed as too localized by egreg, Joseph Wright Apr 6 '13 at 21:05

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.