]> gitweb.factorcode.org Git - factor.git/commitdiff
html.parser.printer: use with-variables instead of with-scope.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 10 Nov 2016 23:38:47 +0000 (15:38 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 10 Nov 2016 23:39:12 +0000 (15:39 -0800)
extra/html/parser/printer/printer.factor

index c3656f8c5edaad2eadd80c81da0706eddc6ccd5f..cfea80fecac2eb27f8caf1c8e455170054c526bd 100644 (file)
@@ -93,12 +93,11 @@ SYMBOL: tab-width
 SYMBOL: #indentations
 
 : prettyprint-html ( vector -- )
-    [
-        T{ html-prettyprinter } html-printer set
-        2 tab-width set
-        0 #indentations set
-        print-tags
-    ] with-scope ;
+    H{
+        { html-printer T{ html-prettyprinter } }
+        { tab-width 2 }
+        { #indentations 0 }
+    } [ print-tags ] with-variables ;
 
 : tabs ( -- vseq )
     tab-width get #indentations get 0 max * CHAR: \s <repetition> ;