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

Comments inside Elmish gets repeated #1347

Closed
3 tasks
dbrattli opened this issue Jan 4, 2021 · 2 comments · Fixed by #1495
Closed
3 tasks

Comments inside Elmish gets repeated #1347

dbrattli opened this issue Jan 4, 2021 · 2 comments · Fixed by #1495

Comments

@dbrattli
Copy link

dbrattli commented Jan 4, 2021

Issue created from fantomas-online

Code

let html =
    Html.div [
        prop.className "navbar-menu"
        prop.children [
            Html.div [
                prop.className "navbar-start"
                prop.children [                    
                    Html.a [
                        prop.className "navbar-item"                        
                    ]
                    (*
                    Html.a [ prop.className "navbar-item"; prop.href (baseUrl +/ "Files") ] [
                        prop.text "Files"
                    ]*)
                ]
            ]                
        ]
    ]

Result

let html =
    Html.div [ prop.className "navbar-menu"
               prop.children [ Html.div [ prop.className "navbar-start"
                                          prop.children [ Html.a [ prop.className "navbar-item" ] (*
                    Html.a [ prop.className "navbar-item"; prop.href (baseUrl +/ "Files") ] [
                        prop.text "Files"
                    ]*)
                                                           ] (*
                    Html.a [ prop.className "navbar-item"; prop.href (baseUrl +/ "Files") ] [
                        prop.text "Files"
                    ]*)
                                           ] (*
                    Html.a [ prop.className "navbar-item"; prop.href (baseUrl +/ "Files") ] [
                        prop.text "Files"
                    ]*)
                                ] (*
                    Html.a [ prop.className "navbar-item"; prop.href (baseUrl +/ "Files") ] [
                        prop.text "Files"
                    ]*)
                ]

Problem description

Commented code (* ... *) inside Elmish constructs gets repeated

Fantomas v4.4.0-alpha-007

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 12/26/2020 15:00:23 - 76fa31e

    { config with
                NewlineBetweenTypeDefinitionAndMembers = true }

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

@nojaf
Copy link
Contributor

nojaf commented Jan 8, 2021

Hey @dbrattli, thanks for reporting this issue.
Did you know about the fsharp_single_argument_web_mode setting by the way?

@dbrattli
Copy link
Author

dbrattli commented Jan 8, 2021

Hey @nojaf, yes already using single argument web mode 🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants