File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/FSharp.Formatting.Literate
tests/FSharp.Literate.Tests Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ namespace FSharp.Formatting.Literate
33open System.IO
44open System.Text .Json
55open FSharp.Formatting .Templating
6+ open FSharp.Formatting .PynbModel
67
78module internal ParsePynb =
89
@@ -17,7 +18,7 @@ module internal ParsePynb =
1718 match this with
1819 | Markdown source -> source
1920 | Code code ->
20- let codeBlock = sprintf $" ```{code.lang}\n {code.source}\n ```"
21+ let codeBlock = sprintf $" ```{code.lang}\n {addLineEnd code.source}```"
2122
2223 match code.outputs with
2324 | None -> codeBlock
@@ -142,7 +143,7 @@ module internal ParsePynb =
142143
143144 json.RootElement.GetProperty( " cells" ) .EnumerateArray()
144145 |> Seq.map ( parseCell >> ( fun x -> x.ToMarkdown()))
145- |> String.concat " \n\n "
146+ |> String.concat " \n "
146147
147148 let pynbToMarkdown ipynbFile =
148149 ipynbFile |> File.ReadAllText |> pynbStringToMarkdown
Original file line number Diff line number Diff line change @@ -1465,7 +1465,7 @@ let add a b = a + b
14651465 |> Literate.ToPynb
14661466 |> ParsePynb.pynbStringToMarkdown
14671467
1468- mdOut |> shouldEqual mdIn
1468+ ( mdOut.Trim ()) |> shouldEqual ( mdIn.Trim ())
14691469
14701470[<Test>]
14711471let ``Script output is exactly right`` () =
You can’t perform that action at this time.
0 commit comments