-
Notifications
You must be signed in to change notification settings - Fork 0
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: include widths.json as a julia file #8
Conversation
src/widths.jl
Outdated
const WIDTHS = JSON3.read( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need JSON3 here? Can't we place it as a literal array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It parses as the inner array as Float64 (instead of Int, Int, Float64)
But it's ok I think. Shouldn't be an issue with the current code charCode >= x[1] && charCode <= x[2]
julia> [32,32,38.67]
3-element Vector{Float64}:
32.0
32.0
38.67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok regexed it into a tuple with correct types
julia> Badges.WIDTHS
10035-element Vector{Tuple{Tuple{Int64, Int64}, Float64}}:
((32, 32), 38.67)
((33, 33), 43.29)
((34, 34), 50.49)
((35, 35), 90.02)
Co-authored-by: Avik Sengupta <[email protected]>
fixes #7