Skip to content

Commit c3cef1b

Browse files
committed
Updated per review comments
1 parent 82f7cbe commit c3cef1b

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/Common/StringParsing.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ module String =
109109
let spaces =
110110
lines
111111
|> Seq.choose (fun line ->
112-
if not <| String.IsNullOrWhiteSpace line then
112+
if String.IsNullOrWhiteSpace line |> not then
113113
line |> Seq.takeWhile Char.IsWhiteSpace |> Seq.length |> Some
114114
else
115115
None)

src/FSharp.Formatting.ApiDocs/GenerateModel.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,10 +2265,8 @@ module internal SymbolReader =
22652265
replacedParagraphs
22662266
|> Seq.collect collectParagraphIndirectLinks
22672267
|> Seq.choose (fun line ->
2268-
if linkNotDefined doc line then
2269-
getTypeLink ctx line |> Some
2270-
else
2271-
None)
2268+
let linkIsDefined = linkNotDefined doc line |> not
2269+
if linkIsDefined then None else getTypeLink ctx line |> Some)
22722270
|> Seq.iter (addLinkToType doc)
22732271

22742272
doc.With(paragraphs = replacedParagraphs)

src/FSharp.Formatting.Common/Templating.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ type FrontMatterFile =
4949
let isBlankLine = String.IsNullOrWhiteSpace line
5050
isBlankLine || line.Contains(":"))
5151
|> Seq.choose (fun line ->
52-
let parts = line.Split(":") |> Array.toList
52+
if String.IsNullOrWhiteSpace line |> not then
53+
let parts = line.Split(":") |> Array.toList
5354

54-
if not <| String.IsNullOrWhiteSpace line then
5555
match parts with
5656
| first :: second :: _ -> Some(first.ToLowerInvariant(), second)
5757
| _ -> None

0 commit comments

Comments
 (0)