We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I couldn't find the issue (maybe #501 is the closest) but I find this behavior strange
julia> code = """ f( a = \"\"\" string \"\"\", b = \"\"\" string \"\"\", ) """; julia> print(code) f( a = """ string """, b = """ string """, ) julia> print(format_text(code)) f(a = """ string """, b = """ string """)
Similar with =>:
=>
julia> code = """ f( "a" => \"\"\" string \"\"\", "b" => \"\"\" string \"\"\", ) """; julia> print(code) f( "a" => """ string """, "b" => """ string """, ) julia> print(format_text(code)) f("a" => """ string """, "b" => """ string """)
I checked this with
(jl_XRYQ8s) pkg> st -m Status `/tmp/jl_XRYQ8s/Manifest.toml` [00ebfdb7] CSTParser v3.3.3 [a80b9123] CommonMark v0.8.6 [34da2185] Compat v3.42.0 [a8cc5b0e] Crayons v4.1.1 [864edb3b] DataStructures v0.18.11 [682c06a0] JSON v0.21.3 [98e50ef6] JuliaFormatter v0.22.7 [bac558e1] OrderedCollections v1.4.1 [69de0a69] Parsers v2.2.3 [0796e94c] Tokenize v0.5.21 [5c2747f8] URIs v1.3.0 ...
The text was updated successfully, but these errors were encountered:
hmmm so what's going on is it thinks the width of the code < the maximum width so it joins the lines which in this case ends up with a strange format.
If you just some 2 multiline strings (no binary op) then it doesn't do this right?
Sorry, something went wrong.
Yeah, I think this is expected:
julia> code = """ f( \"\"\" string \"\"\", \"\"\" string \"\"\", ) """; julia> print(code) f( """ string """, """ string """, ) julia> print(format_text(code)) f( """ string """, """ string """, )
My workaround ATM is to put some comments inside:
julia> code = """ f( # workaround "a" => \"\"\" string \"\"\", "b" => \"\"\" string \"\"\", ) """; julia> print(code) f( # workaround "a" => """ string """, "b" => """ string """, ) julia> print(format_text(code)) f( # workaround "a" => """ string """, "b" => """ string """, )
No branches or pull requests
I couldn't find the issue (maybe #501 is the closest) but I find this behavior strange
Similar with
=>
:I checked this with
The text was updated successfully, but these errors were encountered: