void (Document document, RangeMarker range) { final int start = range.getStartOffset(); for (int i = range.getEndOffset(); i >= start; i--) { if (CharArrayUtil.regionMatches(document.getCharsSequence(), i, ESCAPED_DOUBLE_DASH)) { document.replaceString(i, i + ESCAPED_DOUBLE_DASH.length(), DOUBLE_DASH); } } if (CharArrayUtil.regionMatches(document.getCharsSequence(), start, ESCAPED_GT)) { document.replaceString(start, start + ESCAPED_GT.length(), GT); } }