End state is not being processed properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pixelise |
Fix Committed
|
High
|
Andrew West |
Bug Description
The end element is not being caught correctly. E.g. when you start at an element that is a child of another element and keep processing, the parent's end tag is not being caught.
I am using the demo site (in the tarball), and using this function:
def testendofelement():
"""See if Pixelise works with hanging elements."""
from pixelise.core import Collection
collection = Collection()
paras = collection.
para = paras.next()
pixelate = 'testend.py'
collection.
And this pixelate template:
PIXELISE_PATTERNS = {
'p': 'para',
'publicatio
'sourceDesc': 'source_desc',
}
def para(element, state, context):
"""A paragraph"""
if state == 'end':
return '</p>'
def publication_
"""A paragraph"""
if state == 'end':
raise RuntimeError
def source_
"""An element too far"""
return {'stop_processing': True}
Changed in pixelise: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Zeth (zeth0) |
Changed in pixelise: | |
assignee: | Zeth (zeth0) → Andrew West (andrewwest) |
Problem is worse:
A load of elements get processed that are not part of it, e.g.:
def country(element, state, context):
"""This should not be being found at all."""
print "How come we get here?"