push-formatting ( document element -- )


Vocabulary
html5

Inputs
documentan object
elementan object


Outputs
None

Definition


:: push-formatting ( document element -- )
document active-formatting-elements>> :> entries entries
[ f = ] find-last drop [ 1 + ] [ 0 ] if*
:> start entries length <iota> [
dup start >=
[ entries nth element formatting-equivalent? ]
[ drop f ] if
] filter :> matches matches length 3 >=
[ matches first entries remove-nth! drop ] when
element entries push ;