aboutsummaryrefslogtreecommitdiff
path: root/test/ipynb
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-19 12:09:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-21 12:37:42 -0700
commitc266734448544a118ed80e47deaa2590131c7f84 (patch)
treed5793b1dc732456894c96e8ee6829dab9d539388 /test/ipynb
parent5f7e7f539a02818d0a94309b15d648d51d1eaee6 (diff)
downloadpandoc-c266734448544a118ed80e47deaa2590131c7f84.tar.gz
Use pretty-simple to format native output.
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
Diffstat (limited to 'test/ipynb')
-rw-r--r--test/ipynb/simple.out.native121
1 files changed, 106 insertions, 15 deletions
diff --git a/test/ipynb/simple.out.native b/test/ipynb/simple.out.native
index 4c060b82f..43b170a3a 100644
--- a/test/ipynb/simple.out.native
+++ b/test/ipynb/simple.out.native
@@ -1,15 +1,106 @@
-Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaString "4"),("nbformat_minor",MetaString "5")]))]})
-[Div ("",["cell","markdown"],[])
- [Header 1 ("lorem-ipsum",[],[]) [Str "Lorem",Space,Str "ipsum"]
- ,Para [Strong [Str "Lorem",Space,Str "ipsum"],Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipiscing",Space,Str "elit.",Space,Str "Nunc",Space,Str "luctus",SoftBreak,Str "bibendum",Space,Str "felis",Space,Str "dictum",Space,Str "sodales."]]
-,Div ("",["cell","code"],[])
- [CodeBlock ("",["python"],[]) "print(\"hello\")"]
-,Div ("",["cell","markdown"],[])
- [Header 2 ("pyout",[],[]) [Str "Pyout"]]
-,Div ("",["cell","code"],[("execution_count","2")])
- [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
- ,Div ("",["output","execute_result"],[("execution_count","2")])
- [RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]]
-,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
- [Header 2 ("image",[],[]) [Str "Image"]
- ,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]]
+Pandoc
+ ( Meta
+ { unMeta = fromList
+ [
+ ( "jupyter"
+ , MetaMap
+ ( fromList
+ [
+ ( "nbformat", MetaString "4" )
+ ,
+ ( "nbformat_minor", MetaString "5" )
+ ]
+ )
+ )
+ ]
+ }
+ )
+ [ Div
+ ( "", [ "cell", "markdown" ], [] )
+ [ Header 1
+ ( "lorem-ipsum", [], [] )
+ [ Str "Lorem", Space, Str "ipsum" ]
+ , Para
+ [ Strong
+ [ Str "Lorem", Space, Str "ipsum" ]
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipiscing"
+ , Space
+ , Str "elit."
+ , Space
+ , Str "Nunc"
+ , Space
+ , Str "luctus"
+ , SoftBreak
+ , Str "bibendum"
+ , Space
+ , Str "felis"
+ , Space
+ , Str "dictum"
+ , Space
+ , Str "sodales."
+ ]
+ ]
+ , Div
+ ( "", [ "cell", "code" ], [] )
+ [ CodeBlock ( "", [ "python" ], [] ) "print(\"hello\")" ]
+ , Div
+ ( "", [ "cell", "markdown" ], [] )
+ [ Header 2 ( "pyout", [], [] ) [ Str "Pyout" ] ]
+ , Div
+ ( "", [ "cell", "code" ], [ ( "execution_count", "2" ) ] )
+ [ CodeBlock
+ ( ""
+ , [ "python" ]
+ , []
+ ) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
+ , Div
+ ( ""
+ ,
+ [ "output", "execute_result" ]
+ ,
+ [ ( "execution_count", "2" ) ]
+ )
+ [ RawBlock
+ ( Format "html" ) "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"
+ ]
+ ]
+ , Div
+ ( "", [ "cell", "markdown" ], [ ( "tags", "[\"foo\",\"bar\"]" ) ] )
+ [ Header 2
+ ( "image", [], [] )
+ [ Str "Image" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "image"
+ , Space
+ , Image
+ ( "", [], [] )
+ [ Str "the", Space, Str "moon" ]
+ ( "lalune.jpg", "" )
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "included"
+ , Space
+ , Str "as"
+ , Space
+ , Str "a"
+ , Space
+ , Str "cell"
+ , SoftBreak
+ , Str "attachment."
+ ]
+ ]
+ ]