TEXTUNIT rule with global cdata generating extra TUs and misordered tags

Issue #432 resolved
Former user created an issue

Original issue 432 created by @ysavourel on 2015-01-20T17:51:07.000Z:

attached rule file has commented out TEXTUNIT rules. Uncomment to reproduce bug. Here is unit test:
{{{
@ Test
public void testCdataSubfilterEmptyElement() throws Exception {
URL configUrl = getClass().getResource("/cdataAsHTML.yml");
URL inputUrl = getClass().getResource("/empty_element.xml");
RawDocument rd = new RawDocument(inputUrl.toURI(), "UTF-8", locEN);
List<Event> events = getEvents(filter, rd, configUrl);
assertEquals("foobar",
FilterTestDriver.getTextUnit(events, 1).getSource().toString());
// Make sure there's no "bonus" segment containing the placeholder that
// references the CDATA
assertNull(FilterTestDriver.getTextUnit(events, 2));
}
}}}

Comments (1)

  1. Log in to comment