Skip to content

Fix \w scalar semantics to match digits and underscore - #906

Open
natecook1000 wants to merge 1 commit into
swiftlang:mainfrom
natecook1000:fix/word-builtin-unicode-scalar-semantics
Open

natecook1000 wants to merge 1 commit into
swiftlang:mainfrom
natecook1000:fix/word-builtin-unicode-scalar-semantics

Conversation

@natecook1000

Copy link
Copy Markdown
Member

The thorough-check implementation of \w under scalar semantics only checks isAlphabetic, which doesn't include digits or an underscore. The quick-match version is correct, so the two don't resolve to the same result, and can produce incorrect matches when the input character is non-ASCII.

The thorough-check implementation of \w under scalar semantics
only checks `isAlphabetic`, which doesn't include digits or an
underscore. The quick-match version is correct, so the two don't
resolve to the same result, and can produce incorrect matches
when the input character is non-ASCII.
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.

1 participant