Handbook
Glossary
div-tag ( str style -- str' )
Vocabulary
io
.
streams
.
farkup
.
private
Inputs
str
an
object
style
an
object
Outputs
str'
an
object
Definition
USING:
assocs
combinators
io.styles
kernel
math
sequences
splitting
;
IN:
io.streams.farkup.private
:
div-tag
( str style -- str' )
{
[
font-name
of
"monospace"
=
[
"\n\n"
"\n"
replace
"[{"
"}]"
surround
]
when
]
[
font-size
of
{
{
[
dup
not
]
[
drop
]
}
{
[
dup
18
>=
]
[
drop
"= "
" ="
surround
]
}
{
[
dup
16
>=
]
[
drop
"== "
" =="
surround
]
}
{
[
dup
14
>=
]
[
drop
"=== "
" ==="
surround
]
}
[
drop
]
}
cond
]
}
cleave
;