Matcher matcher = newLinePattern.matcher(input.getText());
int currShiftIndex = 0;
while(matcher.find()) {
logger.debug("Match found. match = \"" + matcher.group(0) + "\"." +
" Start index = " + matcher.start() + ", end index = " + matcher.end());
<BUG>output.shiftDataIn(input, matcher.end() - currShiftIndex);
output.getMarkers().add(new NewLineMarker(output.getText().length()));</BUG>
currShiftIndex = matcher.end();
}
output.shiftCharsInUntilPartialMatch(input, newLinePattern);

Matcher matcher = newLinePattern.matcher(input.getText());
int currShiftIndex = 0;
while(matcher.find()) {
logger.debug("Match found. match = \"" + matcher.group(0) + "\"." +
" Start index = " + matcher.start() + ", end index = " + matcher.end());
output.shiftDataIn(input, matcher.end() - currShiftIndex, StreamedData.MarkerBehaviour.NOT_FILTERING);
output.getMarkers().add(new NewLineMarker(output.getText().length()));
currShiftIndex = matcher.end();
}
output.shiftCharsInUntilPartialMatch(input, newLinePattern);
