Handbook
Glossary
close-heading ( document token -- )
Vocabulary
html5
Inputs
document
an
object
token
an
object
Outputs
None
Definition
USING:
accessors
combinators.short-circuit
kernel
sequences
;
IN:
html5
::
close-heading
( document token -- )
heading-elements
[
document
swap
scope-boundaries
element-in-scope?
]
any?
[
document
""
generate-implied-end-tags
document
open-elements>>
:>
stack stack
[
{
[
html-element?
]
[
name>>
heading-elements
member?
]
}
1&&
]
find-last
drop
[
dup
stack
nth
token
>>end-tag
drop
stack
shorten
]
when*
]
when
;