Handbook
Glossary
parse-tag ( tag -- parsed/f )
Vocabulary
gir
Inputs
tag
an
object
Outputs
parsed/f
an
object
Definition
USING:
accessors
arrays
combinators
kernel
modern.html
sequences
strings
vectors
;
IN:
gir
:
parse-tag
( tag -- parsed/f )
{
{
[
dup
all-blank?
]
[
drop
f
]
}
{
[
dup
string?
]
[
]
}
{
[
dup
vector?
]
[
[
parse-tag
]
map
sift
harvest
]
}
{
[
dup
open-tag?
]
[
[
name>>
]
[
props>>
]
[
children>>
parse-tag
]
tri
3array
process-tag
]
}
{
[
dup
self-close-tag?
]
[
[
name>>
]
[
props>>
]
[
children>>
parse-tag
]
tri
3array
process-tag
]
}
{
[
dup
close-tag?
]
[
drop
f
]
}
{
[
dup
comment?
]
[
drop
f
]
}
{
[
dup
processing-instruction?
]
[
drop
f
]
}
[
unknown-html-directive
]
}
cond
dup
vector?
[
harvest
]
when
;