Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

Bug/issue #, if applicable:

Summary

This is a follow up from #1369

It clarifies some new and existing code based on PR feedback.

Dependencies

None.

Testing

Nothing in particular. This isn't a user facing change.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • [ ] Added tests
  • Ran the ./bin/test script and it succeeded
  • [ ] Updated documentation if necessary

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist force-pushed the use-unicode-literals-in-character-set branch from 02c77a3 to 4ce641b Compare December 5, 2025 11:12
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

.subtracting(CharacterSet(charactersIn: "-")) // Don't remove hyphens. They are used as a whitespace replacement.
static let whitespaceAndDashes = CharacterSet.whitespaces
.union(CharacterSet(charactersIn: "-–—")) // hyphen, en dash, em dash
.union(CharacterSet(charactersIn: "-\u{2013}\u{2014}")) // hyphen, en dash, em dash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better thank you. Previously it was impossible to tell what was going on here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants