Skip to content

Commit

Permalink
Updated per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
1eyewonder committed Jun 19, 2024
1 parent 82f7cbe commit c3cef1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Common/StringParsing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/FSharp.Formatting.Common/Templating.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3cef1b

Please sign in to comment.