All pastes #104555 Raw Edit

Anonymous

public text v1 · immutable
#104555 ·published 2006-07-28 23:57 UTC
rendered paste body
def format_summary(request, page):

    func = Page(request, page.page_name, formatter=Formatter(request)).send_page
    buf = request.redirectedOutput(func, request,
            content_only=1, content_id=page.page_name)

    lines = buf[:_MAX_SUMMARY_LENGTH].split('\n')
    lines = [line for line in lines if line.strip()]
    lines = lines[:_MAX_SUMMARY_LINES]
    if lines:
        lines[-1] += '...'
    return lines

and then, in format_page_edits, I add d['summary'] = format_summary(request, page).

also, in theme/__init__.py, I add 

        html.append('<tr><td/><td colspan="6">')

        if d.has_key('summary') and d['summary']:
            for line in d['summary']:
                html.append("<tt>%s</tt><br/>" % line)

        html.append('</td></tr>\n')


<img href="http://z3.ca/~boris/moinmoin-rc.jpg"/>
is the resulting screwup in the HTML (only the first recently changed entry has images!) i've narrowed it down to my call
    buf = request.redirectedOutput(func, request,
            content_only=1, content_id=page.page_name)

which, if removed, restores the images for all entries. but i don't understand why this is causing a problem.