Skip to content

Commit

Permalink
Bump to alpha three (#1305)
Browse files Browse the repository at this point in the history
* Detect escaped single quote in string as trivia.

* Bump to 4.4.0-alpha-003
  • Loading branch information
nojaf authored Dec 18, 2020
1 parent 312358d commit 5afb9a9
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 6 deletions.
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 4.4.0-alpha-003 - 12/2020

* Stricter trivia selection. [#1304](https://github.com/fsprojects/fantomas/pull/1304)
* Fix static member should only have a single indent. [#1300](https://github.com/fsprojects/fantomas/issues/1300)
* Fix Named string argument to type provider requires a space prior to '@', which Fantomas removes. [#1209](https://github.com/fsprojects/fantomas/issues/1209)
* Fix Don't indent too far. [#659](https://github.com/fsprojects/fantomas/issues/659)

### 4.4.0-alpha-002 - 12/2020

* Revisit SynExpr.IfThenElse without Else branch [#1258](https://github.com/fsprojects/fantomas/issues/1258)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
<Version>4.4.0-alpha-002</Version>
<Version>4.4.0-alpha-003</Version>
<NoWarn>FS0988</NoWarn>
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.CoreGlobalTool/Fantomas.CoreGlobalTool.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net5.0</TargetFramework>
<ToolCommandName>fantomas</ToolCommandName>
<PackAsTool>True</PackAsTool>
<Version>4.4.0-alpha-002</Version>
<Version>4.4.0-alpha-003</Version>
<AssemblyName>fantomas-tool</AssemblyName>
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Extras/Fantomas.Extras.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>4.4.0-alpha-002</Version>
<Version>4.4.0-alpha-003</Version>
<Description>Utility package for Fantomas</Description>
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Tests/Fantomas.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>4.4.0-alpha-002</Version>
<Version>4.4.0-alpha-003</Version>
<NoWarn>FS0988</NoWarn>
<TargetFramework>net5.0</TargetFramework>
<WarningsAsErrors>FS0025</WarningsAsErrors>
Expand Down
15 changes: 15 additions & 0 deletions src/Fantomas.Tests/SynConstTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,18 @@ let a = \\\"\\\\\\\"
getDefines source == []
"

[<Test>]
let ``escaped single quote`` () =
formatSourceString
false
"""
let x = !-(sprintf "\'%s\'" escapedChar)
"""
config
|> prepend newline
|> should
equal
"""
let x = !-(sprintf "\'%s\'" escapedChar)
"""
2 changes: 1 addition & 1 deletion src/Fantomas/Fantomas.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>4.4.0-alpha-002</Version>
<Version>4.4.0-alpha-003</Version>
<Description>Source code formatter for F#</Description>
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas/TokenParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ let private (|InterpStringEndToken|_|) token =
None

let escapedCharacterRegex =
System.Text.RegularExpressions.Regex("(\\\\(n|r|u|\\\"|\\\\))+")
System.Text.RegularExpressions.Regex("(\\\\(n|r|u|'|\\\"|\\\\))+")

let rec private (|EndOfInterpolatedString|_|) tokens =
match tokens with
Expand Down

0 comments on commit 5afb9a9

Please sign in to comment.