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

mask returns invalid result for ISBN with 0 idx #143

Open
mgradalska opened this issue May 28, 2024 · 0 comments
Open

mask returns invalid result for ISBN with 0 idx #143

mgradalska opened this issue May 28, 2024 · 0 comments
Labels

Comments

@mgradalska
Copy link

When I'm trying to mask 9786129999999 ISBN

mask('9786129999999')

it results in string with doubled separator:

'978-612--999999-9'

It doesn't look correct to me. I think the culprit here is that in this part of code

[group, ib[cur + 1:cur + idx + 1], ib[cur + idx + 1:-1], check])

the second entry in the list is ib[6:6] (since idx is 0) and it returns an empty string.

@mgradalska mgradalska added the bug label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant