appendColor(streamedData.getColourMarkers().get(x).color);
html = textToAppend.toString();
appendHtml(html);
currNumChars.set(currNumChars.get() + textToAppend.toString().length());
}
<BUG>if (streamedData.getColorToBeInsertedOnNextChar() != null) {
colorToApplyToNextChar = streamedData.getColorToBeInsertedOnNextChar();
}</BUG>
streamedData.clear();
Integer textHeightBeforeTrim = getTextHeight();

appendColor(streamedData.getColourMarkers().get(x).color);
html = textToAppend.toString();
appendHtml(html);
currNumChars.set(currNumChars.get() + textToAppend.toString().length());
}
List<ColourMarker> colourMarkers = streamedData.getColourMarkers();
if(colourMarkers.get(colourMarkers.size() - 1).charPos == streamedData.getText().length()) {
colorToApplyToNextChar = colourMarkers.get(colourMarkers.size() - 1).color;
}
streamedData.clear();
Integer textHeightBeforeTrim = getTextHeight();
