Note that in LaTeX the item starts at the start of the next paragrap, not where the comamnd itself is present. Moreover, LaTex merges lists in \@donoparitem when they are stacked directly on items.
<..html latex lists..>
\let\:item=\@item
\def\@item[#1]{\ifx \EndPicture\:Undef
<.prepend @item[...].>\fi
\if@newlist \:item[{#1}]\@newlisttrue
\else \:item[{#1}]\fi \global\@inlabeltrue
\ifx \EndPicture\:Undef
<.append @item[...].>\leavevmode \ignorespaces
\fi }
-_-_-
We insert the \leavevmode to ensure that all \items at the beginnig of lists are true. Otherwise, the lack of them causes a lose of html-info during collapsing effects as is the case, e.g., in the following code.
In addition, without the \leavevmode we can end up with an outcome ‘<CODE > <LI> \@</CODE>’ instead of ‘<LI><CODE > \@</CODE>’.
Within ‘|<prepend @item[...]|>’, \if@noitemarg indicates whether we have a non user supplied label. Within ‘|<append @item[...]|>’, \if@inlabel does the job before we encounter the first paragraph.
Note that X1111 Y2222 X1111 X2222 is the output of ‘\ht:everypar{X\ht:everypar{Y}} \par 1111 \par 2222 \par \ht:everypar{X\ht:everypar{Y}} \par {1111} \par {2222} ’. That is, the everypars might happen within groups. Hence, probably the reason for \if@inlabel
<..append @item[...]..>
\ShowRefstepAnchor
\ht:everypar{%
\if@newlist <.start new list.>\fi
\global\@minipagefalse\global\@newlistfalse
\if@inlabel
\global\@inlabelfalse
<.before each item.>\box\@labels
<.after each item.>%
\penalty\z@
\else <.between list pars.>%
\fi
\ht:everypar{<.between list pars.>}}%
-_-_-
<..before each item..>
\global\let\empty:D:T:D=\empty \:DT \hfill\break
-_-_-
The \hfill\break prevents collapsing of spaces. We want to put \:DT at the end so it will gobble only the item mark. However, we can’t because of the problem of collapsing spaces.
<..after each item..>
\:DD \ShowPar
-_-_-
<..between list pars..>
\:ListParSkip
-_-_-
<..html latex lists..>+
\def\ListParSkip{\def\:ListParSkip}
\ListParSkip{\HtmlPar}
-_-_-