commit 35ca52a88d46d787397a1d2bab791ffbe3c65395
parent e186bdee0f3184a24665caf41afbd9f365410900
Author: Eli Barzilay <eli@racket-lang.org>
Date: Thu, 24 Jul 2008 08:16:07 +0000
hack: see comment
svn: r10892
original commit: 1f6007ce8b4213e2f402445745c9e37764ee31b4
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss
@@ -755,10 +755,14 @@
(render-flow* p part ri start-inline? #t))
(define/override (render-paragraph p part ri)
- `((p ,(if (styled-paragraph? p)
- `([class ,(styled-paragraph-style p)])
- `())
- ,@(super render-paragraph p part ri))))
+ ;; HACK: for the search, we need to be able to render a `div'
+ ;; with an `id' attribute, `p' will probably work fine instead
+ ;; of `div' since it's a block element. Do this for now.
+ (let ([contents (super render-paragraph p part ri)]
+ [style (and (styled-paragraph? p) (styled-paragraph-style p))])
+ (if (and (pair? style) (eq? (car style) 'div))
+ `((div-hack ,(cdr style) ,@contents))
+ `((p ,(if style `([class ,style]) `()) ,@contents)))))
(define/override (render-element e part ri)
(cond