You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing the underlying matched NSRange for use with NSAttributedString has come up in both #26 and #37.
At this point I still consider the Foundation types implementation details. There are gotchas related the use of UTF-16, and I'd prefer to err on the side of safety where it's not possible to make that kind of mistake.
There are probably two main considerations stopping me from adding NSAttributedString support at the moment:
So far I've endeavoured to only expose types in the standard library in the public API. NSAttributedString isn't bridged, so I've avoided supporting it. If there was a first-class attributed string value type in the standard library, I think I'd be willing to support it.
At this point I'm still interested in reserving the right to replace the regular expression engine with something else, like PCRE.
In a world where Foundation is fully supported and cross-platform (and NSRegularExpression is implemented—it wasn't last time I checked), these reasons will start to hold less water.
Update: Moving away from NSRegularExpression at this stage is unlikely. So the main issue here seems like an API design one.
The text was updated successfully, but these errors were encountered:
Accessing the underlying matched
NSRange
for use withNSAttributedString
has come up in both #26 and #37.At this point I still consider the Foundation types implementation details. There are gotchas related the use of UTF-16, and I'd prefer to err on the side of safety where it's not possible to make that kind of mistake.
There are probably two main considerations stopping me from adding
NSAttributedString
support at the moment:NSAttributedString
isn't bridged, so I've avoided supporting it. If there was a first-class attributed string value type in the standard library, I think I'd be willing to support it.At this point I'm still interested in reserving the right to replace the regular expression engine with something else, like PCRE.In a world where Foundation is fully supported and cross-platform (andNSRegularExpression
is implemented—it wasn't last time I checked), these reasons will start to hold less water.Update: Moving away from
NSRegularExpression
at this stage is unlikely. So the main issue here seems like an API design one.The text was updated successfully, but these errors were encountered: