You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeNotNullNotZero=static memberString()=
Arb.Default.String()|> Arb.mapFilter (fun a ->if isNull a then""else a)(fun t ->not(t.Contains("\000")))
Result
typeNotNullNotZero=static memberString()=
Arb.Default.String()|> Arb.mapFilter (fun a ->if isNull a then""else a)(fun t ->not(t.Contains("�")))
Problem description
A string containing explicit unicode character "\000" is converted into null character during formatting. The null character itself breaks some text editors when the file is opened.
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 version 4.6.0
Default Fantomas configuration with these extra setting:
Thank you for reporting this issue.
I noticed the settings that you've mentioned are actually part of the default ones, so adding those to an .editorconfig is unnecessary. For simplicity sake, you might want to keep those out.
As for the issue, the string content is not being recognized as a trivia item.
In short, we cannot always trust the string content that we find in the AST created by the compiler.
So, we try and detect this using a regex:
Issue created from fantomas-online
Code
Result
Problem description
A string containing explicit unicode character "\000" is converted into null character during formatting. The null character itself breaks some text editors when the file is opened.
Extra information
Options
Fantomas version 4.6.0
Default Fantomas configuration with these extra setting:
[*.fs]
max_line_length=120
fsharp_space_before_colon=false
fsharp_strict_mode=false
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The text was updated successfully, but these errors were encountered: