Skip to content
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

YASStyle() breaks some code #461

Open
kafisatz opened this issue Aug 27, 2021 · 3 comments
Open

YASStyle() breaks some code #461

kafisatz opened this issue Aug 27, 2021 · 3 comments
Labels
bug Something isn't working YASStyle

Comments

@kafisatz
Copy link

cross referencing this https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/29

using JuliaFormatter
using Dash
using DashCoreComponents
using DashHtmlComponents
using DashTable

fileorig = joinpath(mktempdir(),"afile.jl")
txtorig = """html_div(style=Dict("width"=>"300px"),[dcc_dropdown(id = "input-id0", options = [Dict(("label" => "some text"), ("value" => "AA")), Dict("label" => "something else"), ("value" => "pdc")], value="AA",multi = false)])"""
open(fileorig,"w") do f
    write(f,txtorig)
end

include(fileorig) #works

format_file(fileorig,YASStyle())

include(fileorig) #fails
@kafisatz
Copy link
Author

see also a possible solution indicated by @pfitzseb https://discourse.julialang.org/t/ann-juliaformatter-jl/48084/31?u=bernhard

@domluna domluna added the bug Something isn't working label Aug 27, 2021
@domluna
Copy link
Owner

domluna commented Aug 27, 2021

making the semicolon insertion an option should fix this. Also moving args around could work but the former is easier

@domluna
Copy link
Owner

domluna commented May 24, 2022

There's now an option to remove the semicolon https://github.com/domluna/JuliaFormatter.jl#separate_kwargs_with_semicolon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working YASStyle
Projects
None yet
Development

No branches or pull requests

2 participants