bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e2d5a5dd670ce1df9ae2b29a1b707416bf316f38
parent f68f07ec741d678435ee6f025d57c0599d26690e
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Fri,  7 Dec 2007 15:59:19 +0000

add explicit word-break for hyphens in on-this-page navigation display

svn: r7913

original commit: d81c9a2836f1f871c71f1b4e19b6f218c5e05375

Diffstat:
Mcollects/scribble/html-render.ss | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss @@ -499,10 +499,16 @@ (define/override (render-other i part ri) (cond [(string? i) (let ([m (and (extra-breaking?) - (regexp-match-positions #rx"[:/]" i))]) + (regexp-match-positions #rx"[-:/]" i))]) (if m (list* (substring i 0 (cdar m)) - `(span ((class "mywbr")) " ") + ;; Most browsers wrap after a hyphen. The + ;; one that doesn't, Firefox, pays attention + ;; to wbr. Some browsers ignore wbr, but + ;; at they don't do strange things with it. + (if (equal? #\- (string-ref i (caar m))) + '(wbr) + `(span ((class "mywbr")) " ")) (render-other (substring i (cdar m)) part ri)) (list i)))] [(eq? i 'mdash) `(" " ndash " ")]