Handbook
Glossary
print-closing-tag ( tag -- )
Vocabulary
html
.
parser
.
printer
Inputs
tag
an
object
Outputs
None
Definition
IN:
html.parser.printer
HOOK:
print-closing-tag
html-printer
( tag -- )
Methods
USING:
accessors
html.parser.printer
io
kernel
namespaces
sequences
;
M:
html-prettyprinter
print-closing-tag
[
{
"br"
"img"
}
member?
[
#indentations
dec
]
unless
]
[
indent
"</"
write
name>>
write
">\n"
write
]
bi
;
USING:
accessors
html.parser.printer
io
;
M:
src-printer
print-closing-tag
"</"
write
name>>
write
">"
write
;
USING:
accessors
combinators
html.parser.printer
io
kernel
namespaces
sequences
;
M:
text-printer
print-closing-tag
name>>
{
[
"blockquote"
=
[
#indentations
dec
]
when
]
[
{
"p"
"blockquote"
"h1"
"h2"
"h3"
"h4"
"h5"
}
member?
[
nl
indent
nl
indent
]
when
]
[
{
"ul"
"ol"
"li"
"tr"
}
member?
[
nl
indent
]
when
]
[
{
"th"
"td"
}
member?
[
bl
]
when
]
[
"pre"
=
[
preformatted?
off
]
when
]
[
"script"
=
[
script?
off
]
when
]
[
"style"
=
[
style?
off
]
when
]
}
cleave
;