MWE:
\documentclass{amsart}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}\label{thm}
This is a theorem.
\end{theorem}
\begin{proof}[Proof of Theorem~\ref{thm}]
This is a proof.
\end{proof}
\end{document}
Compiled with make4ht
, one gets
[ERROR] htlatex: ./test.tex 11 Extra \else.
There is no error if hyperref
package is not included. It is also worth to mention that, this issue also appears if we replace \begin{proof}[Proof of Theorem~\ref{thm}]
by \begin{proof}[Proof of Theorem~\hyperref[thm]{some theorem}]
.
I wonder the reason and a workaround. Thanks.