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
569 stars 65 forks source link

Strips inline comments #862

Open MilesCranmer opened 4 weeks ago

MilesCranmer commented 4 weeks ago
julia> using JuliaFormatter

julia> format_text("T <: Tuple #=e.g., Tuple{Union{Float32,Float64}}=# && !(T isa Union) #= e.g., Union{Tuple{A},Tuple{B}}=#")
"T <: Tuple && !(T isa Union) #= e.g., Union{Tuple{A},Tuple{B}}=#"

Seems to strip the first inline comment completely

domluna commented 3 weeks ago

I think I can get this to work in the rewrite to JuliaSyntax