domluna / JuliaFormatter.jl

An opinionated code formatter for Julia. Plot twist - the opinion is your own.
https://domluna.github.io/JuliaFormatter.jl/dev/
MIT License
583 stars 69 forks source link

`LoadError` for certain sub/superscript variables: `a = - ᶠb` #885

Open haakon-e opened 1 month ago

haakon-e commented 1 month ago

On JuliaFormatter v1.0.62,

Any of these fail:

a = - ₐb
a = - ᵃb
a = - ᶠb

This succeeds:

a = - ᶜb

Julia v1.11.1

domluna commented 1 month ago
julia> s = """
       a = - ₐb
       a = - ᵃb
       a = - ᶠb
       """
"a = - ₐb\na = - ᵃb\na = - ᶠb\n"

julia> format_text(s)
"a = - ₐb\na = - ᵃb\na = - ᶠb\n"

julia> format_text(s) |> print
a = - ₐb
a = - ᵃb
a = - ᶠb

this seems to work on master