Handbook
Glossary
close-list-item ( document name -- )
Vocabulary
html5
Inputs
document
an
object
name
an
object
Outputs
None
Definition
USING:
accessors
arrays
combinators.short-circuit
kernel
sequences
;
IN:
html5
::
close-list-item
( document name -- )
name
{
"dd"
"dt"
}
member?
[
{
"dd"
"dt"
}
]
[
name
1array
]
if
:>
names document
open-elements>>
[
{
[
{
[
html-element?
]
[
name>>
names
member?
]
}
1&&
]
[
{
[
special-element?
]
[
name>>
~array~
member?
not
]
}
1&&
]
}
1||
]
find-last
nip
[
dup
html-element?
over
name>>
names
member?
and
[
name>>
:>
found document found
generate-implied-end-tags
document
<end-tag>
found
>>name
close-element
]
[
drop
]
if
]
when*
;