### Question:
PotentialBracketEndDelimiter extends InlineWithText { boolean precededByBackslashEscape(Cursor cursor, int originalOffset) { int count = 0; for (int index = originalOffset - 1; index >= 0; --index) { char c = cursor.getChar(index); if (c == '\\') { ++count; } else { break; } } return count % 2 == 1; } PotentialBracketEndDelimiter(Line line, int offset); @Override void emit(DocumentBuilder builder); @Override void apply(ProcessingContext context, List<Inline> inlines, Cursor cursor); void truncate(List<Inline> inlines, int indexOfOpeningDelimiter);  }### Answer:
@Test public void precededByBackslashEscape() { PotentialBracketEndDelimiter delimiter = new PotentialBracketEndDelimiter(line, 0); assertFalse(delimiter.precededByBackslashEscape(Cursors.createCursor("["), 0)); assertFalse(delimiter.precededByBackslashEscape(Cursors.createCursor("\\\\["), 2)); assertFalse(delimiter.precededByBackslashEscape(Cursors.createCursor("\\\\\\\\["), 4)); assertTrue(delimiter.precededByBackslashEscape(Cursors.createCursor("\\["), 1)); assertTrue(delimiter.precededByBackslashEscape(Cursors.createCursor("a\\["), 2)); assertTrue(delimiter.precededByBackslashEscape(Cursors.createCursor("\\\\\\["), 3)); }