Handbook
Glossary
(rcdata-end-tag-name-state) ( document n/f string ch/f -- document n'/f string )
Vocabulary
html5
Inputs
document
an
object
n/f
an
object
string
an
object
ch/f
an
object
Outputs
document
an
object
n'/f
an
object
string
an
object
Definition
USING:
combinators
kernel
math
sequences
;
IN:
html5
:
(rcdata-end-tag-name-state)
( document n/f string ch/f -- document n'/f string )
{
{
[
dup
"\t\n\f "
member?
]
[
drop
pick
appropriate-end-tag-token?
[
before-attribute-name-state
]
[
"</"
reach
emit-temporary-buffer-with
rcdata-state
]
if
]
}
{
[
dup
47
=
]
[
drop
pick
appropriate-end-tag-token?
[
self-closing-start-tag-state
]
[
"</"
reach
emit-temporary-buffer-with
rcdata-state
]
if
]
}
{
[
dup
62
=
]
[
drop
pick
appropriate-end-tag-token?
[
pick
emit-end-tag
data-state
]
[
"</"
reach
emit-temporary-buffer-with
rcdata-state
]
if
]
}
{
[
dup
ascii-upper-alpha?
]
[
[
32
+
reach
push-tag-name
]
[
reach
push-temporary-buffer
]
bi
rcdata-end-tag-name-state
]
}
{
[
dup
ascii-lower-alpha?
]
[
[
reach
push-tag-name
]
[
reach
push-temporary-buffer
]
bi
rcdata-end-tag-name-state
]
}
[
[
"</"
reach
emit-temporary-buffer-with
]
dip
(rcdata-state)
]
}
cond
;