Skip to content

Commit

Permalink
Fix #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Guerra committed Jul 3, 2013
1 parent 9d3d0f8 commit b7cf96b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Fantomas.Tests/OperatorTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ let ``should keep space between ( and * in *= operator definition``() =
formatSourceString false """let inline ( *=) l v = update (( *) v) l
""" config
|> should equal """let inline ( *= ) l v = update ((*) v) l"""

[<Test>]
let ``should not add space around ? operator``() =
formatSourceString false """let x = y?z.d?c.[2]?d.xpto()""" config
|> should equal """let x = y?z.d?c.[2]?d.xpto()"""

2 changes: 1 addition & 1 deletion src/Fantomas/FormatConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ let internal unindentOnWith(ctx : Context) =
if ctx.Config.IndentOnTryWith then unindent ctx else ctx

/// Don't put space before and after these operators
let internal NoSpaceInfixOps = set [".."]
let internal NoSpaceInfixOps = set [".."; "?"]

/// Always break into newlines on these operators
let internal NewLineInfixOps = set ["|>"; "||>"; "|||>"; ">>"]
Expand Down

0 comments on commit b7cf96b

Please sign in to comment.