FileReferenceSet: support different separators & escaping. last touch amends

This commit is contained in:
Gregory.Shrago
2015-09-24 21:15:06 +03:00
parent 190b8fa772
commit 3bc7199097
@@ -266,7 +266,7 @@ public class FileReferenceSet {
if (curSep >= 0 && decoded.length() == wsHead + sepLen + wsTail) {
// add extra reference for the only & leading "/"
TextRange r = TextRange.create(startInElement, offset(curSep + Math.max(0, sepLen - 1), escaper, valueRange) + 1);
referencesList.add(createFileReference(r, 0, decoded.subSequence(curSep, curSep + sepLen).toString()));
referencesList.add(createFileReference(r, index ++, decoded.subSequence(curSep, curSep + sepLen).toString()));
}
curSep = curSep == wsHead ? curSep + sepLen : wsHead; // reset offsets & start again for simplicity
sepLen = 0;