NSString.paragraphRangeForRange incorrectly treats line separators as paragraph separators
| Originator: | an00na | ||
| Number: | rdar://27174419 | Date Originated: | 05-Jul-2016 12:12 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 10 beta 1 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: It is basically a re-radar of 15203065 which I cannot access any more on Radar. I don't know what you did but such missing radars happen quite often and are frustrating for bug reporters. '\n' is a line separator. But paragraphRangeForRange also treats it as a paragraph separator. I think it is incorrect according to Unicode Newline Guidelines: http://unicode.org/standard/reports/tr13/tr13-5.html. Anyway the document of getParagraphStart(_:end:contentsEnd:forRange:) should state clearly what characters are paragraph separators, just like getLineStart(_:end:contentsEnd:forRange:) for line separators. Steps to Reproduce: Run sample app and read console logs. Code: http://cl.ly/3U1N2H2Z0R3Z
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!