From 1f6007ce8b4213e2f402445745c9e37764ee31b4 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 24 Jul 2008 08:16:07 +0000 Subject: [PATCH] hack: see comment svn: r10892 --- collects/scribble/html-render.ss | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index 4b8e0650f3..7a84aa8cc0 100644 --- 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