String html;
html = textToAppend.toString();
appendHtml(html);
currNumChars.set(currNumChars.get() + textToAppend.toString().length());
for (int x = 0; x < streamedData.getColourMarkers().size(); x++) {
<BUG>int indexOfFirstCharInNode = streamedData.getColourMarkers().get(x).position;
</BUG>
int indexOfLastCharInNodePlusOne;
if (x >= streamedData.getColourMarkers().size() - 1) {
indexOfLastCharInNodePlusOne = streamedData.getText().length();

String html;
html = textToAppend.toString();
appendHtml(html);
currNumChars.set(currNumChars.get() + textToAppend.toString().length());
for (int x = 0; x < streamedData.getColourMarkers().size(); x++) {
int indexOfFirstCharInNode = streamedData.getColourMarkers().get(x).charPos;
int indexOfLastCharInNodePlusOne;
if (x >= streamedData.getColourMarkers().size() - 1) {
indexOfLastCharInNodePlusOne = streamedData.getText().length();
