]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/xkcd/xkcd.factor
html.parser.printer: add helper words with string output.
[factor.git] / extra / xkcd / xkcd.factor
index e6c356daaef80ab153733a8dd472d29f8db90af2..c9cfcbad523255086c69e5586533938a3ba56cb6 100644 (file)
@@ -3,9 +3,9 @@
 
 USING: accessors formatting html.entities html.parser
 html.parser.analyzer html.parser.printer http.client images.http
-images.viewer images.viewer.prettyprint io io.streams.string
-kernel parser prettyprint.custom prettyprint.sections regexp
-sequences strings ui wrap.strings ;
+images.viewer images.viewer.prettyprint io kernel parser
+prettyprint.custom prettyprint.sections regexp sequences strings
+ui wrap.strings ;
 
 IN: xkcd
 
@@ -22,8 +22,7 @@ IN: xkcd
 : comic-text ( url -- string )
     http-get nip parse-html
     "transcript" find-by-id-between
-    [ html-text. ] with-string-writer
-    html-unescape ;
+    html-text html-unescape ;
 
 : comic-text. ( url -- )
     comic-text 80 wrap-string print ;