The function updateAttributedString() doesn't check for escaped endMarker
In the function updateAttributedString():
endRange = [scanString rangeOfString:endMarker options:options range:remainingRange];
It doesn't check for an escaped endMarker:
if (hasCharacterRelative(scanString, endRange, -1, escapeCharacter)) { continueScan = YES; //scanEndIndex = endRange.location + endRange.length; scanEndIndex = endRange.location + 1; }
Therefore, it will fail to properly parse:
[\(\)](http://apple.com)
I added a test in ddfe1856d51a02234670b473fdf00f11107f4cdf and will be fixing this in the improvements I have planned for escaping literals.
This should be fixed in 0e8512a17743ccf202335d125803fc77c6b67f9d. I'm going to do some more real world testing before I close this issue, but feel free to take a look and try it out.