]> gitweb.factorcode.org Git - factor.git/commitdiff
html.parser.printer: prevent negative indentations.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 5 Aug 2013 16:54:36 +0000 (09:54 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 5 Aug 2013 16:56:44 +0000 (09:56 -0700)
extra/html/parser/printer/printer.factor

index eabd53b4d04e2149c1906c9356a0e8619a9ba4cd..5e636ef6ff8052ace9e371970e5bdb592fce6732 100644 (file)
@@ -1,6 +1,6 @@
 USING: accessors assocs combinators html.parser
-html.parser.utils io kernel math namespaces sequences strings
-unicode.categories ;
+html.parser.utils io kernel math math.order namespaces sequences
+strings unicode.categories ;
 IN: html.parser.printer
 
 TUPLE: html-printer ;
@@ -79,7 +79,7 @@ SYMBOL: tagstack
     ] with-scope ;
 
 : tabs ( -- vseq )
-    tab-width get #indentations get * CHAR: \s <repetition> ;
+    tab-width get #indentations get 0 max * CHAR: \s <repetition> ;
 
 M: html-prettyprinter print-opening-tag ( tag -- )
     name>>