Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change delimiter to also match Unicode Space Separators #219

Merged
merged 2 commits into from Jan 11, 2024

Conversation

paulzzy
Copy link
Contributor

@paulzzy paulzzy commented Dec 29, 2023

See https://www.compart.com/en/unicode/category/Zs for a list of the
included characters.

Fixes #218.

@paulzzy
Copy link
Contributor Author

paulzzy commented Dec 30, 2023

I just realized that \p{Space_Separator} doesn't match tabs or newlines (and a couple other things covered by \s.

The tests pass regardless, but I added \s back in case it causes problems otherwise.

@paulzzy paulzzy changed the title Change delimiter to match Unicode Space Separators Change delimiter to also match Unicode Space Separators Dec 30, 2023
@paulzzy
Copy link
Contributor Author

paulzzy commented Dec 30, 2023

Also, I'd like to add tests for \p{Space_Separator}, where should I do that?

@inukshuk
Copy link
Owner

Sorry it took my a while to get to this!

I'd add tokenizer tests here. But since this is essentially a configuration option I'm not even sure that we should add too many specific tests. I'll merge this now, but you're welcome to add tests in a separate PR.

@inukshuk inukshuk merged commit d360a47 into inukshuk:main Jan 11, 2024
13 checks passed
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.

Consider normalizing whitespace
2 participants