diff --git a/src/Common/StringParsing.fs b/src/Common/StringParsing.fs index f02edb25..1136bd4c 100644 --- a/src/Common/StringParsing.fs +++ b/src/Common/StringParsing.fs @@ -109,7 +109,7 @@ module String = let spaces = lines |> Seq.choose (fun line -> - if not <| String.IsNullOrWhiteSpace line then + if String.IsNullOrWhiteSpace line |> not then line |> Seq.takeWhile Char.IsWhiteSpace |> Seq.length |> Some else None) diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index e0d222dd..dfed5f30 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -2265,10 +2265,8 @@ module internal SymbolReader = replacedParagraphs |> Seq.collect collectParagraphIndirectLinks |> Seq.choose (fun line -> - if linkNotDefined doc line then - getTypeLink ctx line |> Some - else - None) + let linkIsDefined = linkNotDefined doc line |> not + if linkIsDefined then None else getTypeLink ctx line |> Some) |> Seq.iter (addLinkToType doc) doc.With(paragraphs = replacedParagraphs) diff --git a/src/FSharp.Formatting.Common/Templating.fs b/src/FSharp.Formatting.Common/Templating.fs index 8d05ce51..d17684ed 100644 --- a/src/FSharp.Formatting.Common/Templating.fs +++ b/src/FSharp.Formatting.Common/Templating.fs @@ -49,9 +49,9 @@ type FrontMatterFile = let isBlankLine = String.IsNullOrWhiteSpace line isBlankLine || line.Contains(":")) |> Seq.choose (fun line -> - let parts = line.Split(":") |> Array.toList + if String.IsNullOrWhiteSpace line |> not then + let parts = line.Split(":") |> Array.toList - if not <| String.IsNullOrWhiteSpace line then match parts with | first :: second :: _ -> Some(first.ToLowerInvariant(), second) | _ -> None