Venus: Excerpt filter working in tests, not on config file

Mary Gardiner mary at puzzling.org
Mon Sep 15 11:21:21 EST 2008


On Sun, Sep 14, 2008, Sam Ruby wrote:
> That sounds like a bug.  I'd prefer a fix where the content tag is
> replaced over changing htmltmpl to pick up the last content tag.

It is a bug, it's an error of logic in the excerpt.py filter.

The old node would usually be removed by this line:

if source[0].nodeName == excerpt.nodeName:
    source[0].parentNode.removeChild(source[0])

However, the problem with this solution is that in the case of the feed
I am looking at, source[0].nameName is actually 'summary', because the
feed provides its own summary. excerpt.nodeName is 'content'.

I've provided alternative logic at:
http://users.puzzling.org/users/mary/bzr/venus/branches/excerpt-fix-replacement-logic/

-Mary


More information about the devel mailing list