def test_empty_text_in_span(self): """ http://trac.edgewall.org/ticket/4336 """ ns = Namespace('http://www.w3.org/1999/xhtml') input = [(START, (ns.span, Attrs([])), (None, -1, -1)), (TEXT, "", (None, -1, -1)), (END, ns.span, (None, -1, -1)), ] lines = list(_group_lines(input)) self.assertEqual(len(lines), 0)
import itertools import logging from genshi import Markup, Namespace, Stream, QName from genshi.core import START, TEXT from genshi.template.eval import Expression import flatland from flatland.util import Maybe from .taglistener import TagListener, default_start __all__ = 'flatland_filter', log = logging.getLogger('flatland.out.genshi') NAMESPACE = Namespace(u'http://ns.discorporate.us/flatland/genshi') # filter attributes F_BIND = NAMESPACE[u'bind'] # HTML attributes H_CHECKED = QName(u'checked') H_FOR = QName(u'for') H_ID = QName(u'id') H_NAME = QName(u'name') H_SELECTED = QName(u'selected') H_TABINDEX = QName(u'tabindex') H_VALUE = QName(u'value') MAYBE = (u'auto', ) YES = (u'1', u'true', u't', u'on', u'yes')