JuliaFormatter.jl icon indicating copy to clipboard operation
JuliaFormatter.jl copied to clipboard

incorrect formatting of comments - Version 2

Open PierreBarrat opened this issue 4 months ago • 0 comments

Hello, First of all, thank you for this very convenient package.

I have the habit of using "banner"-like comments to organize source files (see below) With 2.0, this causes issues with formatting.

A file like:

function foo(x)
    return println(x)
end

#=====================#
######## Part1 ########
#=====================#

function foo()
    return println("foo")
end

#=====================#
######## Part2 ########
#=====================#

function bar()
    return println("bar")
end

gets formatted to (format(".", BlueStyle()):

function foo(x)
    return println(x)
end#=====================##=====================#

######## Part1 ########

function foo()
    return println("foo")
end#=====================##=====================#

######## Part2 ########

function bar()
    return println("bar")
end

PierreBarrat avatar Oct 17 '24 13:10 PierreBarrat