The {alltt} environment should preserve blank lines but alltt.tex:
\documentclass{article}
\usepackage{alltt}
\begin{document}
\begin{alltt}
#!/usr/bin/env bash
echo 'Hello'
\end{alltt}
\end{document}
converted with
latexml --strict --destination alltt.xml alltt.tex
results in
[...]
<verbatim font="typewriter">
#!/usr/bin/env bash
echo ’Hello’
</verbatim>
[...]
The
{alltt}environment should preserve blank lines butalltt.tex:converted with
results in
[...] <verbatim font="typewriter"> #!/usr/bin/env bash echo ’Hello’ </verbatim> [...]