From 729062d28c37adaa71e3d27b176a531c2e97a5df Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 8 Jan 2017 10:26:43 -0800 Subject: [PATCH] tiny improvement --- pollen/unstable/typography.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pollen/unstable/typography.rkt b/pollen/unstable/typography.rkt index bb54b5b..e0b992c 100644 --- a/pollen/unstable/typography.rkt +++ b/pollen/unstable/typography.rkt @@ -44,7 +44,8 @@ ;; then replace the actual strings with substrings from this converted result ;; todo: handle entities & chars correctly, for now they are ignored (define flat-str (string-append* (filter string? (flatten (remove-attrs x))))) - (define char-vec (for/vector ([c (in-string (smart-quotes flat-str))]) + (define char-vec (for/vector #:length (string-length flat-str) + ([c (in-string (smart-quotes flat-str))]) c)) (define offset 0) (let loop ([x x])