aboutsummaryrefslogtreecommitdiff
path: root/test/ipynb
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
commit0bdcf415e4eff83ad8e35c1d41c8a28e0bbd5da1 (patch)
treec9bda08418e67755254ad2d1d2e95dd691bd1902 /test/ipynb
parent8018179b3df34cd7fdbd77c7a08b21fd8d5b5b31 (diff)
downloadpandoc-0bdcf415e4eff83ad8e35c1d41c8a28e0bbd5da1.tar.gz
Switch from pretty-simple to pretty-show for native output.
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
Diffstat (limited to 'test/ipynb')
-rw-r--r--test/ipynb/simple.out.native183
1 files changed, 90 insertions, 93 deletions
diff --git a/test/ipynb/simple.out.native b/test/ipynb/simple.out.native
index 43b170a3a..0f243ca48 100644
--- a/test/ipynb/simple.out.native
+++ b/test/ipynb/simple.out.native
@@ -1,106 +1,103 @@
Pandoc
- ( Meta
- { unMeta = fromList
- [
- ( "jupyter"
- , MetaMap
- ( fromList
- [
- ( "nbformat", MetaString "4" )
- ,
- ( "nbformat_minor", MetaString "5" )
- ]
- )
- )
- ]
+ 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."
+ ( "" , [ "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\")" ]
+ ( "" , [ "cell" , "code" ] , [] )
+ [ CodeBlock ( "" , [ "python" ] , [] ) "print(\"hello\")" ]
, Div
- ( "", [ "cell", "markdown" ], [] )
- [ Header 2 ( "pyout", [], [] ) [ Str "Pyout" ] ]
+ ( "" , [ "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" ) ]
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "2" ) ]
)
- [ RawBlock
- ( Format "html" ) "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"
+ [ 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."
+ ( ""
+ , [ "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."
+ ]
]
- ]
]