tex4ht incompatible with expdlist

I try to convert the below document with htlatex and no options and it spits this error on me:

! LaTeX Error: Something's wrong--perhaps a missing \item.


There's no error if I remove the square brackets and their contents behind the description environment. There's another error, if I only include one item:

! Missing number, treated as zero.
\c:\end:itm
l.7   \end{description}


Minimal example:

\documentclass{article}
\usepackage{expdlist}
\begin{document}
\begin{description}[\breaklabel\setleftmargin{1ex}]
\item[test1]text1
\item[test2]text2
\end{description}
\end{document}

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it): this is better than <pre> in most cases as it does syntax highlighting. – Joseph Wright Nov 19 '11 at 16:19

This looks like a bug.

Here is an ugly workaround:

\usepackage{expdlist}
\begin{document}
\ifx\HCode\UnDef
\begin{description}[\breaklabel\setleftmargin{1ex}]
\else
\begin{description}
\fi
\item[test1]text1
\item[test2]text2
\end{description}
\end{document}


Update 2. The bug is closed. Until the patch travels to your system, just add the file expdlist.4ht to your work directory with the following contents:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% expdlist.4ht                          2011-11-20-04:55 %
% Copyright (C) 2007--2009       Eitan M. Gurari         %
%               2009--2011       TeX Users Group         %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3c of this license or (at your option) any   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3c or later is part of all distributions %
% of LaTeX version 2005/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is the TeX4ht Project <tex4ht@tug.org>.                %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                                        tex4ht@tug.org  %
%                             http://www.tug.org/tex4ht  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2011-11-20-04:55}
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
%
%
% We just ignore optional arguments to description during ht run...
%
\let\description@orig=\description
\def\description{\@ifnextchar[% ]
{\description@ht}{\description@orig}}
\def\description@ht[#1]{\description@orig}
\Hinput{expdlist}
\endinput

-
Ok, let's say it's a bug, is it tex4ht or expdlist? – cjorssen Nov 19 '11 at 20:48
I guess tex4ht. I recently joined the team of tex4ht, so I promise to look at the bug asap :) – Boris Nov 19 '11 at 20:54
Thanks for reporting the bug and taking care of it ;-) – cjorssen Nov 19 '11 at 21:15
@cjorssen I've closed the bug - see the update – Boris Nov 20 '11 at 5:22
@Boris Thanks! There's still something I don't understand. What's the rule for the need of modifications to original macros in <package>.4ht. For example, \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \item Test \end{enumerate} Some text \begin{enumerate}[resume] \item Test \end{enumerate} \end{document} will work although enumitem.4ht does not redefine \enumerate to check for optional argument. – cjorssen Nov 20 '11 at 9:51

This works without any problems. The formating can be controlled with \Css{...} declarations.

\documentclass{article}
\usepackage{expdlist,lipsum}

\begin{document}

\def\enditem{}
\def\enditemone{\Tg</dd>}

\ConfigureList{description}
{\Tg<dl>}
{\enditem\Tg</dl>}
{\enditem\Tg<dt>}
{\Tg</dt>\Tg<dd>\let\enditem\enditemone}

\begin{description}[\breaklabel\setleftmargin{1ex}]
\item[test1]\lipsum[1]
\item[test2]\lipsum[2]
\end{description}

\end{document}
`
-