avoid genarating toc-content if not needed

svn: r10592

original commit: 97006715341ab34af7d3986250861a7824c5364e
This commit is contained in:
Eli Barzilay 2008-07-04 01:04:18 +00:00
parent e578b6c328
commit c0575d104b

View File

@ -371,7 +371,7 @@
"tocviewselflink" "tocviewlink")])
,@(render-content (or (part-title-content p) '("???"))
d ri))))))
(define toc-content
(define (toc-content)
(parameterize ([extra-breaking? #t])
(map do-part
(let loop ([l (map (lambda (v) (cons v #t)) (part-parts top))])
@ -385,7 +385,8 @@
`((div ([class "tocset"])
,@(if (part-style? d 'no-toc)
null
(let* ([content (render-content
(let* ([toc-content (toc-content)]
[content (render-content
(or (part-title-content top) '("???"))
d ri)]
[content (if (null? toc-content)
@ -532,7 +533,8 @@
,title
,(scribble-css-contents style-file css-path)
,(scribble-js-contents script-file script-path))
(body () ,@(render-toc-view d ri)
(body ()
,@(render-toc-view d ri)
(div ([class "maincolumn"])
(div ([class "main"])
,@(render-version d ri)