Handbook
Glossary
reconstruct-formatting ( document -- )
Vocabulary
html5
Inputs
document
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
sequences
;
IN:
html5
::
reconstruct-formatting
( document -- )
document
active-formatting-elements>>
:>
entries document
open-elements>>
:>
stack entries
length
:>
i!
[
i 0
>
[
i 1
-
entries
nth
dup
f
=
[
drop
f
]
[
stack
node-member?
not
]
if
]
[
f
]
if
]
[
i 1
-
i!
]
while
[
i entries
length
<
]
[
i entries
nth
clone-formatting-element
:>
element document element
insert-element
element i entries
set-nth
i 1
+
i!
]
while
;