]
module internal SymbolReader =
@@ -1433,7 +1428,7 @@ module internal SymbolReader =
let fullArgUsage =
match argInfos with
- | [ [] ] when (v.IsProperty && v.HasGetterMethod) -> !! ""
+ | [ [] ] when (v.IsProperty && v.HasGetterMethod) -> !!""
| _ -> formatCurriedArgsUsageAsHtml preferNoParens isItemIndexer argInfos
let usageHtml =
@@ -1449,7 +1444,7 @@ module internal SymbolReader =
fullArgUsage ]
// Indexers
- | _, true, _, "Item", _ -> span [] [ !! "this["; fullArgUsage; !! "]" ]
+ | _, true, _, "Item", _ -> span [] [ !!"this["; fullArgUsage; !!"]" ]
// Custom operators
| _, _, _, _, Some name ->
@@ -1457,7 +1452,7 @@ module internal SymbolReader =
[]
[ !!name
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
// op_XYZ operators
@@ -1473,7 +1468,7 @@ module internal SymbolReader =
let right = formatArgUsageAsHtml 1 y
- span [] [ left; !! " "; encode nm; !! " "; right ]
+ span [] [ left; !!" "; encode nm; !!" "; right ]
// unary operators
| [ [ x ] ] ->
@@ -1487,17 +1482,17 @@ module internal SymbolReader =
[]
[ !!name
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
// Ordinary instance members
| _, true, _, name, _ ->
span
[]
- [ !! "this."
+ [ !!"this."
!!name
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
// A hack for Array.Parallel.map in FSharp.Core. TODO: generalise this
@@ -1506,7 +1501,7 @@ module internal SymbolReader =
[]
[ !!("Array.Parallel." + name)
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
// Ordinary functions or values
@@ -1515,7 +1510,7 @@ module internal SymbolReader =
[]
[ !!name
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
// Ordinary static members or things (?) that require fully qualified access
@@ -1526,7 +1521,7 @@ module internal SymbolReader =
| None -> !!name
| Some aee -> !!(aee.DisplayName + "." + name)
if preferNoParens then
- !! " "
+ !!" "
fullArgUsage ]
let usageHtml = codeHtml usageHtml
@@ -1638,15 +1633,15 @@ module internal SymbolReader =
let fieldsHtmls = fields |> List.map formatFieldUsage
if case.Name = "op_ColonColon" then
- span [] [ fieldsHtmls.[0]; !! " "; !!nm; fieldsHtmls.[1] ] |> codeHtml
+ span [] [ fieldsHtmls.[0]; !!" "; !!nm; fieldsHtmls.[1] ] |> codeHtml
else
match fieldsHtmls with
| [] -> span [] [ !!nm ]
- | [ fieldHtml ] -> span [] [ !!nm; !! " "; fieldHtml ]
+ | [ fieldHtml ] -> span [] [ !!nm; !!" "; fieldHtml ]
| _ ->
let fieldHtml = fieldsHtmls |> Html.sepWith ", "
- span [] [ !!nm; !! "("; fieldHtml; !! ")" ]
+ span [] [ !!nm; !!"("; fieldHtml; !!")" ]
|> codeHtml
let paramTypes =
@@ -1737,7 +1732,7 @@ module internal SymbolReader =
span
[]
[ !!staticParam.Name
- !! ": "
+ !!": "
formatTypeAsHtml ctx.UrlMap staticParam.Kind
!!(if staticParam.IsOptional then
sprintf " (optional, default = %A)" staticParam.DefaultValue
diff --git a/src/FSharp.Formatting.Common/Menu.fs b/src/FSharp.Formatting.Common/Menu.fs
index 77f8b5f47..52e608d35 100644
--- a/src/FSharp.Formatting.Common/Menu.fs
+++ b/src/FSharp.Formatting.Common/Menu.fs
@@ -10,10 +10,7 @@ type MenuItem =
IsActive: bool }
let private snakeCase (v: string) =
- System.Text.RegularExpressions.Regex
- .Replace(v, "[A-Z]", "$0")
- .Replace(" ", "_")
- .ToLower()
+ System.Text.RegularExpressions.Regex.Replace(v, "[A-Z]", "$0").Replace(" ", "_").ToLower()
let createMenu (input: string) (isCategoryActive: bool) (header: string) (items: MenuItem list) : string =
let pwd = Directory.GetCurrentDirectory()
diff --git a/src/FSharp.Formatting.Literate/Literate.fs b/src/FSharp.Formatting.Literate/Literate.fs
index fd363a18e..c77a17c24 100644
--- a/src/FSharp.Formatting.Literate/Literate.fs
+++ b/src/FSharp.Formatting.Literate/Literate.fs
@@ -115,8 +115,7 @@ type Literate private () =
let rootInputFolder = Some(defaultArg rootInputFolder (Path.GetDirectoryName(path)))
- ParseScript(parseOptions, ctx)
- .ParseAndCheckScriptFile(path, File.ReadAllText path, rootInputFolder, onError)
+ ParseScript(parseOptions, ctx).ParseAndCheckScriptFile(path, File.ReadAllText path, rootInputFolder, onError)
|> Transformations.generateReferences references
|> Transformations.formatCodeSnippets path ctx
|> Transformations.evaluateCodeSnippets ctx
@@ -145,8 +144,7 @@ type Literate private () =
| None -> "C:\\script.fsx"
| Some r -> Path.Combine(r, "script.fsx")
- ParseScript(parseOptions, ctx)
- .ParseAndCheckScriptFile(filePath, content, rootInputFolder, onError)
+ ParseScript(parseOptions, ctx).ParseAndCheckScriptFile(filePath, content, rootInputFolder, onError)
|> Transformations.generateReferences references
|> Transformations.formatCodeSnippets filePath ctx
|> Transformations.evaluateCodeSnippets ctx
@@ -249,8 +247,7 @@ type Literate private () =
let content = ParsePynb.pynbStringToFsx content
- ParseScript(parseOptions, ctx)
- .ParseAndCheckScriptFile(filePath, content, rootInputFolder, onError)
+ ParseScript(parseOptions, ctx).ParseAndCheckScriptFile(filePath, content, rootInputFolder, onError)
|> Transformations.generateReferences references
|> Transformations.formatCodeSnippets filePath ctx
|> Transformations.evaluateCodeSnippets ctx
@@ -354,7 +351,8 @@ type Literate private () =
/// Format the literate document as Latex without using a template
static member ToLatex
- (doc: LiterateDocument, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver) =
+ (doc: LiterateDocument, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver)
+ =
let crefResolver = defaultArg crefResolver (fun _ -> None)
let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None)
diff --git a/src/FSharp.Formatting.Literate/Transformations.fs b/src/FSharp.Formatting.Literate/Transformations.fs
index 3a8cdfe62..610d8d00b 100644
--- a/src/FSharp.Formatting.Literate/Transformations.fs
+++ b/src/FSharp.Formatting.Literate/Transformations.fs
@@ -471,12 +471,7 @@ module internal Transformations =
// Split the formatted code into lines & emit line numbers in |
// (Similar to formatSnippets in FSharp.Formatting.CodeFormat\HtmlFormatting.fs)
let lines =
- code
- .Trim('\r', '\n')
- .Replace("\r\n", "\n")
- .Replace("\n\r", "\n")
- .Replace("\r", "\n")
- .Split('\n')
+ code.Trim('\r', '\n').Replace("\r\n", "\n").Replace("\n\r", "\n").Replace("\r", "\n").Split('\n')
let numberLength = lines.Length.ToString().Length
let linesLength = lines.Length
diff --git a/src/FSharp.Formatting.Markdown/Markdown.fs b/src/FSharp.Formatting.Markdown/Markdown.fs
index 6cb5e6249..f208e4dab 100644
--- a/src/FSharp.Formatting.Markdown/Markdown.fs
+++ b/src/FSharp.Formatting.Markdown/Markdown.fs
@@ -148,7 +148,8 @@ type Markdown internal () =
/// Transform the provided MarkdownDocument into LaTeX
/// format and write the result to a given writer.
static member WriteLatex
- (doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver, ?lineNumbers) =
+ (doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver, ?lineNumbers)
+ =
let newline = defaultArg newline Environment.NewLine
let substitutions = defaultArg substitutions []
let crefResolver = defaultArg crefResolver (fun _ -> None)
diff --git a/src/fsdocs-tool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs
index 457c05301..539786a96 100644
--- a/src/fsdocs-tool/BuildCommand.fs
+++ b/src/fsdocs-tool/BuildCommand.fs
@@ -124,9 +124,7 @@ type internal DocContent
Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot))
let uri =
- Uri(outputFolderFullPath + "/")
- .MakeRelativeUri(Uri(markdownReferenceFullOutputPath))
- .ToString()
+ Uri(outputFolderFullPath + "/").MakeRelativeUri(Uri(markdownReferenceFullOutputPath)).ToString()
Some uri
with _ ->
@@ -760,7 +758,7 @@ type internal DocContent
[
// No categories specified
if modelsByCategory.Length = 1 && (fst modelsByCategory.[0]) = None then
- li [ Class "nav-header" ] [ !! "Documentation" ]
+ li [ Class "nav-header" ] [ !!"Documentation" ]
for model in snd modelsByCategory.[0] do
let link = model.Uri(root)
@@ -783,7 +781,7 @@ type internal DocContent
match cat with
| Some c -> li [ Class $"nav-header %s{categoryActiveClass}" ] [ !!c ]
- | None -> li [ Class $"nav-header %s{categoryActiveClass}" ] [ !! "Other" ]
+ | None -> li [ Class $"nav-header %s{categoryActiveClass}" ] [ !!"Other" ]
for model in modelsInCategory do
let link = model.Uri(root)
diff --git a/src/fsdocs-tool/fsdocs-tool.fsproj b/src/fsdocs-tool/fsdocs-tool.fsproj
index c1890fed1..73d5540cd 100644
--- a/src/fsdocs-tool/fsdocs-tool.fsproj
+++ b/src/fsdocs-tool/fsdocs-tool.fsproj
@@ -3,7 +3,7 @@
Exe
fsdocs
- net8.0
+ net10.0
fsdocs-tool
LatestMajor
true
diff --git a/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj b/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj
index 33ed5d45f..0677d55f3 100644
--- a/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj
+++ b/tests/FSharp.ApiDocs.Tests/FSharp.ApiDocs.Tests.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
LatestMajor
true
diff --git a/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj b/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj
index bb82b7cd8..a6c26396c 100644
--- a/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj
+++ b/tests/FSharp.CodeFormat.Tests/FSharp.CodeFormat.Tests.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
LatestMajor
true
diff --git a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj
index a931eff92..f205f5d3b 100644
--- a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj
+++ b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
LatestMajor
true
diff --git a/tests/FSharp.Literate.Tests/LiterateTests.fs b/tests/FSharp.Literate.Tests/LiterateTests.fs
index bd13e0c72..2c5f43216 100644
--- a/tests/FSharp.Literate.Tests/LiterateTests.fs
+++ b/tests/FSharp.Literate.Tests/LiterateTests.fs
@@ -355,10 +355,7 @@ var
let formatted = FSharp.Formatting.CSharpFormat.SyntaxHighlighter.FormatHtml(html)
- let expected =
- html
- .Replace(" lang=\"csharp\"", "")
- .Replace("var", "var")
+ let expected = html.Replace(" lang=\"csharp\"", "").Replace("var", "var")
formatted |> shouldEqual expected
@@ -1559,12 +1556,7 @@ let ``pynb outputs passed to script correctly`` () =
printfn "%s" fsx
printfn "----"
- let fsx2 =
- fsx
- .Replace("\r\n", "\n")
- .Replace(" \n", "\n")
- .Replace("\n\n*)", "\n*)")
- .Replace("\n", "!")
+ let fsx2 = fsx.Replace("\r\n", "\n").Replace(" \n", "\n").Replace("\n\n*)", "\n*)").Replace("\n", "!")
let expected =
"""(**
diff --git a/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj b/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj
index 7b47455fe..7cf41388d 100644
--- a/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj
+++ b/tests/FSharp.Markdown.Tests/FSharp.Markdown.Tests.fsproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
LatestMajor
true
|