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

Fix unescaped whitespace in is_whitespace/1 #1

Merged
merged 2 commits into from
May 20, 2020
Merged

Fix unescaped whitespace in is_whitespace/1 #1

merged 2 commits into from
May 20, 2020

Conversation

nickdichev
Copy link
Contributor

Hi, first of all thanks for the library.

I think version 0.6.0 of :unicode_set broke this library, I was getting a compilation error:

== Compilation error in file lib/unicode_guards.ex ==
** (Unicode.Set.ParseError) Unable to parse "[[\t-\r][:Zs:]]". expected range while processing sequence inside set inside property or empty set or set. Detected at "[\t-\r][:Zs:]]".
    lib/unicode_set.ex:72: Unicode.Set.parse!/1
    expanding macro: Unicode.Set.match?/2
    lib/unicode_guards.ex:72: Unicode.Guards.is_whitespace/1
    (elixir 1.10.1) expanding macro: Kernel.and/2
    lib/unicode_guards.ex:72: Unicode.Guards.is_whitespace/1
    (elixir 1.10.1) expanding macro: Kernel.Utils.defguard/2
    lib/unicode_guards.ex: Unicode.Guards.is_whitespace/1

I noticed that :unicode_set is pinned at version 0.5.1 but I got the latest 0.7.0 when I pulled the dep.

I think this should fix the issue. I got the library to compile and the tests are passing!

@kipcole9 kipcole9 merged commit 3a4862f into elixir-unicode:master May 20, 2020
kipcole9 added a commit that referenced this pull request May 20, 2020
@kipcole9
Copy link
Contributor

Really appreciate the PR and sorry for the sloppy release testing on my side. All fixed now and published on hex as unicode_guards version 0.3.1. The changelog is:

Bug Fixes

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.

2 participants