]> gitweb.factorcode.org Git - factor.git/commitdiff
pdf.wrap: make sure to calculate whitespace properly.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Feb 2017 17:14:10 +0000 (09:14 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Feb 2017 17:14:10 +0000 (09:14 -0800)
extra/pdf/wrap/wrap.factor

index 3e3d50708d33eec52e2ef2ec8a89f864b130522f..86d9ff86a30a49905db46a85deba1e94c5d3fa64 100644 (file)
@@ -31,7 +31,7 @@ PRIVATE>
 
 : string>elements ( string font -- elements )
     [ word-split ] dip '[
-        dup word-split1 "" or
+        dup dup [ blank? ] find drop [ cut ] [ "" ] if*
         [ _ swap text-width ] bi@
         <element>
     ] map ;