Here is the error with make4ht
/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./foo3.aux)
! TeX capacity exceeded, sorry [input stack size=5000].
<to be read again>
\a:display
l.33 }}")}
28056 words of node memory still in use:
17 hlist, 3 vlist, 2 rule, 4 local_par, 3 dir, 3330 math, 30 glue, 1 kern, 7
penalty, 2 glyph, 61 glue_spec, 3 temp, 1665 if_stack, 2 write, 184 special no