]> gitweb.factorcode.org Git - factor.git/commitdiff
html.streams: fix tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 2 Mar 2020 02:32:35 +0000 (18:32 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 2 Mar 2020 02:32:35 +0000 (18:32 -0800)
basis/html/streams/streams-tests.factor
basis/html/streams/streams.factor

index 354a1c40796ec33d3b9a23a469bed326bbfd0c4e..4be6a663c261777f006d96035e1809e11ed0433b 100644 (file)
@@ -49,7 +49,7 @@ M: funky url-of "http://www.funky-town.com/" swap town>> append ;
     ] make-html-string
 ] 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 } } }
@@ -57,7 +57,7 @@ M: funky url-of "http://www.funky-town.com/" swap town>> append ;
     ] make-html-string
 ] 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
 ] unit-test
 
index 1cd46c7a42312560405ffc569f7482b2e827d38f..7a20014388a2fbbc1735d063ab98ebe461ac75ce 100644 (file)
@@ -55,8 +55,7 @@ TUPLE: html-sub-stream < html-writer style parent ;
     "font-size: " % # "pt; " % ;
 
 : font-css, ( font -- )
-    [ "font-family: " % % "; " % ]
-    [ "monospace" = [ "white-space: pre-wrap; " % ] when ] bi ;
+    "font-family: " % % "; " % ;
 
 MACRO: make-css ( pairs -- str )
     [ '[ _ of [ _ execute ] when* ] ] { } assoc>map