text.handleReplaceBetween(cursor, cursor+clen, str);
len += OPEN_DELIM_LEN + 1; // adjust for delimiters
cursor += len; // advance cursor and adjust for new text
text.handleReplaceBetween(cursor, cursor+clen, str);
len += OPEN_DELIM_LEN + 1; // adjust for delimiters
cursor += len; // advance cursor and adjust for new text