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

Sam Ruby rubys at intertwingly.net
Mon Sep 15 11:45:21 EST 2008


On Sun, Sep 14, 2008 at 9:21 PM, Mary Gardiner <mary at puzzling.org> wrote:
> 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/

Any insight as to why test_excerpt_lorem_ipsum_summary in
tests/test_filters.py fails to fail?

I'd prefer if the test case were adjusted (or another test case was
added) so that future changes don't re-break this.

> -Mary

- Sam Ruby


More information about the devel mailing list