Skip to content

Commit 4884263

Browse files
committed
fantomas format
1 parent d6b46db commit 4884263

File tree

4 files changed

+28
-19
lines changed

4 files changed

+28
-19
lines changed

src/FSharp.Formatting.Literate/Literate.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ type Literate private () =
543543
| _ -> parseOptions
544544

545545
let md = ParsePynb.pynbToMarkdown input
546+
546547
let doc =
547548
Literate.ParseMarkdownString(
548549
md,

src/fsdocs-tool/BuildCommand.fs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,18 +351,21 @@ type internal DocContent
351351
printfn " preparing %s --> %s" inputFileFullPath outputFileRelativeToRoot
352352

353353
let evaluateNotebook ipynbFile =
354-
let psi =
355-
ProcessStartInfo(fileName = "dotnet",
356-
arguments = $"repl --run {ipynbFile} --default-kernel fsharp --exit-after-run --output-path {ipynbFile}",
357-
UseShellExecute = false,
358-
CreateNoWindow = true)
359-
360-
let p = Process.Start(psi)
361-
p.WaitForExit()
354+
let psi =
355+
ProcessStartInfo(
356+
fileName = "dotnet",
357+
arguments =
358+
$"repl --run {ipynbFile} --default-kernel fsharp --exit-after-run --output-path {ipynbFile}",
359+
UseShellExecute = false,
360+
CreateNoWindow = true
361+
)
362+
363+
let p = Process.Start(psi)
364+
p.WaitForExit()
362365

363366
if evaluate then
364-
printfn $" evaluating {inputFileFullPath} with dotnet-repl"
365-
evaluateNotebook inputFileFullPath
367+
printfn $" evaluating {inputFileFullPath} with dotnet-repl"
368+
evaluateNotebook inputFileFullPath
366369

367370

368371
let model =
@@ -399,7 +402,7 @@ type internal DocContent
399402
template,
400403
outputFileFullPath
401404
)))
402-
405+
403406
else if mainRun then
404407
yield
405408
(None,

tests/FSharp.Literate.Tests/DocContentTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,4 @@ let ``ipynb notebook evaluates`` () =
288288
let ipynbOut = rootOutputFolderAsGiven </> "eval.html" |> File.ReadAllText
289289
290290
ipynbOut |> shouldContainText "10007"
291-
*)
291+
*)

tests/FSharp.Literate.Tests/LiterateTests.fs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,8 @@ let goodbye = 2
14351435

14361436
[<Test>]
14371437
let ``md --> pynb --> md comes back the same`` () =
1438-
let mdIn = """Heading
1438+
let mdIn =
1439+
"""Heading
14391440
=======
14401441
14411442
| Col1 | Col2 |
@@ -1453,13 +1454,17 @@ let add a b = a + b
14531454
```python
14541455
```
14551456
"""
1456-
let mdOut =
1457-
Literate.ParseMarkdownString(mdIn,
1458-
parseOptions =
1459-
(MarkdownParseOptions.ParseCodeAsOther
1460-
||| MarkdownParseOptions.ParseNonCodeAsOther))
1461-
|> Literate.ToPynb
1457+
1458+
let mdOut =
1459+
Literate.ParseMarkdownString(
1460+
mdIn,
1461+
parseOptions =
1462+
(MarkdownParseOptions.ParseCodeAsOther
1463+
||| MarkdownParseOptions.ParseNonCodeAsOther)
1464+
)
1465+
|> Literate.ToPynb
14621466
|> ParsePynb.pynbStringToMarkdown
1467+
14631468
mdOut |> shouldEqual mdIn
14641469

14651470
[<Test>]

0 commit comments

Comments
 (0)