lvjr / codehigh

Highlight codes and demos with l3regex and lpeg
https://ctan.org/pkg/codehigh
11 stars 6 forks source link

Fails if braces are not balanced in a `codehigh` environment #1

Closed dbitouze closed 2 years ago

dbitouze commented 3 years ago

codehigh fails if braces are not balanced in a codehigh environment:

\documentclass{article}
\usepackage{codehigh}
\begin{document}

This stuff will be at the end of the preamble:

\begin{codehigh}[language=latex/latex3]
\AddToHook{begindocument/before}{
\end{codehigh}

The stuff:

\begin{codehigh}[language=latex/latex3]
...
\end{codehigh}

We close the "at the end of the preamble" part:

\begin{codehigh}[language=latex/latex3]
}
\end{codehigh}

\end{document}
lvjr commented 3 years ago

At this time, codehigh environment is not a real verbatim environment, but an environment similar to that defined by \NewEnviron command. I need to improve the environment.

lvjr commented 2 years ago

This bug has been fixed in commit https://github.com/lvjr/codehigh/commit/88d17e2463f580f637e516642b6f64b7785bad1e.