]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprint.sections: don't create empty strings with zero indent.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 11 Jun 2017 17:53:55 +0000 (10:53 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 11 Jun 2017 17:53:55 +0000 (10:53 -0700)
basis/prettyprint/sections/sections.factor

index 6ad8f49df051ef18b31bdb625f760c317301ef08..187112cdc9510ccedb0c84f6dd0a7fe0c8fbe27d 100644 (file)
@@ -42,7 +42,8 @@ M: maybe vocabulary-name
 : line-limit? ( -- ? )
     line-limit get dup [ pprinter get line-count>> <= ] when ;
 
-: do-indent ( -- ) pprinter get indent>> CHAR: \s <string> write ;
+: do-indent ( -- )
+    pprinter get indent>> [ CHAR: \s <string> write ] unless-zero ;
 
 : fresh-line ( n -- )
     pprinter get 2dup last-newline>> = [