Handbook
Glossary
close-element ( document token -- )
Vocabulary
html5
Inputs
document
an
object
token
an
object
Outputs
None
Definition
USING:
accessors
combinators.short-circuit
kernel
sequences
;
IN:
html5
::
close-element
( document token -- )
document
open-elements>>
:>
stack stack
[
{
[
html-element?
]
[
name>>
token
name>>
sequence=
]
}
1&&
]
find-last
drop
[
dup
stack
nth
token
>>end-tag
drop
stack
shorten
token
name>>
formatting-marker-elements
member?
[
document
clear-formatting
]
when
]
when*
;