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

cure hangs when fed specific character #4

Closed
virtualritz opened this issue Feb 4, 2023 · 7 comments
Closed

cure hangs when fed specific character #4

virtualritz opened this issue Feb 4, 2023 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@virtualritz
Copy link

virtualritz commented Feb 4, 2023

I.e. when fed unicode character “ˑ” (U+02D1) (Modifier Letter Half Triangular Colon):

fn main() {
    println!("{}", decancer::cure("ˑ").as_str());
    println!("This never prints.");
}
@virtualritz
Copy link
Author

virtualritz commented Feb 4, 2023

FYI: I am using this for string matching to find unicode glyphs.
Because of this I'm building a lookup table where for each unicode character I have the decancered version.

P.S.P It would be great if there was a version of cure that takes a single char and spits out a cured char (or u32).

@virtualritz virtualritz changed the title cure hangs when fed speicific character cure hangs when fed specific character Feb 4, 2023
@null8626
Copy link
Owner

null8626 commented Feb 5, 2023

thanks for this bug report! will look into later.

@null8626 null8626 added the bug Something isn't working label Feb 5, 2023
@null8626
Copy link
Owner

null8626 commented Feb 5, 2023

apparently, the bug is in the binary search implementation... i've recently fixed the problem and added several more confusables (including the one you've pointed out)

the changes should be included in a future update (v1.5.4) in a few days. be patient!

@virtualritz
Copy link
Author

Cheers!
I this alreay in the repo so I can use an overlay in my Cargo.toml?

@null8626
Copy link
Owner

null8626 commented Feb 7, 2023

Nope - not yet, apparently fixing the binary search caused another bug here, i will get into that really quickly soon!

It will be bundled with v1.5.4 in a short time - be patient!

null8626 added a commit that referenced this issue Feb 10, 2023
@null8626
Copy link
Owner

i've fixed the issue in a commit 2 days ago - currently adding more features to version 1.5.4.

sorry if it takes a while - i'm very busy!

@null8626
Copy link
Owner

v1.5.4 is here!

@null8626 null8626 added the enhancement New feature or request label Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants