html.streams: fix tests.
parent
12118f02e2
commit
e15d2775ae
|
@ -49,7 +49,7 @@ M: funky url-of "http://www.funky-town.com/" swap town>> append ;
|
||||||
] make-html-string
|
] make-html-string
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
{ "<div style=\"background-color: #ff00ff; white-space: pre; font-family: monospace; display: inline-block; \">cdr</div>" }
|
{ "<div style=\"background-color: #ff00ff; display: inline-block; \">cdr</div>" }
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
H{ { page-color T{ rgba f 1 0 1 1 } } }
|
H{ { page-color T{ rgba f 1 0 1 1 } } }
|
||||||
|
@ -57,7 +57,7 @@ M: funky url-of "http://www.funky-town.com/" swap town>> append ;
|
||||||
] make-html-string
|
] make-html-string
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
{ "<div style=\"white-space: pre; font-family: monospace; display: inline-block; \"></div><br/>" } [
|
{ "<div style=\"display: inline-block; \"></div><br/>" } [
|
||||||
[ H{ } [ ] with-nesting nl ] make-html-string
|
[ H{ } [ ] with-nesting nl ] make-html-string
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,7 @@ TUPLE: html-sub-stream < html-writer style parent ;
|
||||||
"font-size: " % # "pt; " % ;
|
"font-size: " % # "pt; " % ;
|
||||||
|
|
||||||
: font-css, ( font -- )
|
: font-css, ( font -- )
|
||||||
[ "font-family: " % % "; " % ]
|
"font-family: " % % "; " % ;
|
||||||
[ "monospace" = [ "white-space: pre-wrap; " % ] when ] bi ;
|
|
||||||
|
|
||||||
MACRO: make-css ( pairs -- str )
|
MACRO: make-css ( pairs -- str )
|
||||||
[ '[ _ of [ _ execute ] when* ] ] { } assoc>map
|
[ '[ _ of [ _ execute ] when* ] ] { } assoc>map
|
||||||
|
|
Loading…
Reference in New Issue