Closed manavy closed 9 years ago
Yay grapheme clusters vs bytes!
This is now fixed in the swift1p2
branch, but relies on new functions in Swift 1.2 (mostly samePositionIn(characters:)
) so I won't be porting it over to master any time soon. Here's to hoping Apple officially releases Xcode 6.3 soon!
This is now fixed in master.
Hi, I tried to run jazzy with multibyte texts and I found it doesn't work with multibyte texts.
It can be reproduced by parsing this code.
I’ve investigated a little bit and I seems like below. In values from sourcekitd(?) like offset or bodyoffset, a Japanese character is counted as 3. But NSRange in filteredSubstring counts a multibyte character as 1. As a result, the range index will be out of bounds.