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

double-backtick identifier is formatted wrong when starts with non-alphanum character #776

Closed
jindraivanek opened this issue Apr 23, 2020 · 0 comments · Fixed by #777
Closed
Assignees

Comments

@jindraivanek
Copy link
Contributor

Issue created from fantomas-ui

Code

// not working
let ``!foo hoo`` () = ()
let ``@foo hoo`` () = ()
let ``$foo hoo`` () = ()
let ``%foo hoo`` () = ()
let ``^foo hoo`` () = ()
let ``&foo hoo`` () = ()
let ``*foo hoo`` () = ()
let ``<foo hoo`` () = ()
let ``>foo hoo`` () = ()
let ``=foo hoo`` () = ()
let ``-foo hoo`` () = ()
let ``|foo hoo`` () = ()

// works
let ``#foo hoo`` () = ()
let ``(foo hoo`` () = ()
let ``)foo hoo`` () = ()
let ``_foo hoo`` () = ()
let ``.foo hoo`` () = ()
let ``\foo hoo`` () = ()
let ``🐛foo hoo`` () = ()

// constants works
let ``!foo hoo`` = ()
let ``@foo hoo`` = ()

Error

// not working
let (!foo hoo) () = ()
let (@foo hoo) () = ()
let ($foo hoo) () = ()
let (%foo hoo) () = ()
let (^foo hoo) () = ()
let (&foo hoo) () = ()
let ( *foo hoo ) () = ()
let (<foo hoo) () = ()
let (>foo hoo) () = ()
let (=foo hoo) () = ()
let (-foo hoo) () = ()
let (|foo hoo) () = ()

// works
let ``#foo hoo`` () = ()
let ``(foo hoo`` () = ()
let ``)foo hoo`` () = ()
let ``_foo hoo`` () = ()
let ``.foo hoo`` () = ()
let ``\foo hoo`` () = ()
let ``🐛foo hoo`` () = ()

// constants works
let ``!foo hoo`` = ()
let ``@foo hoo`` = ()

Options

Fantomas Next - 3.3.0-4/8/2020

Name Value
IndentOnTryWith false
IndentSpaceNum 4
KeepNewlineAfter false
MaxIfThenElseShortWidth 40
PageWidth 120
ReorderOpenDeclaration false
SemicolonAtEndOfLine false
SpaceAfterComma true
SpaceAfterSemicolon true
SpaceAroundDelimiter true
SpaceBeforeClassConstructor false
SpaceBeforeColon false
SpaceBeforeLowercaseInvocation true
SpaceBeforeMember false
SpaceBeforeParameter true
SpaceBeforeSemicolon false
SpaceBeforeUppercaseInvocation false
StrictMode false
@jindraivanek jindraivanek self-assigned this Apr 23, 2020
jindraivanek added a commit to jindraivanek/fantomas that referenced this issue Apr 23, 2020
nojaf pushed a commit that referenced this issue Apr 24, 2020
… use backticks when not needed (#777)

* #776 test

* add IdentBetweenTicks trivia for SynPat.LongIdent node

* dont use backticks when not needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant