0bdcf415e4
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.
1,011 B
1,011 B
% pandoc -f rst -t org
.. code:: haskell
:number-lines: 42
main = putStrLn "Hello World!"
unsafePerformIO main
^D
#+begin_src haskell -n 42
main = putStrLn "Hello World!"
unsafePerformIO main
#+end_src
% pandoc -f org -t native
#+begin_src lisp -n 20
(+ 1 1)
#+end_src
#+begin_src lisp +n 10
(+ 2 2)
#+end_src
^D
[ CodeBlock
( ""
, [ "commonlisp" , "numberLines" ]
, [ ( "org-language" , "lisp" ) , ( "startFrom" , "20" ) ]
)
"(+ 1 1)\n"
, CodeBlock
( ""
, [ "commonlisp" , "numberLines" , "continuedSourceBlock" ]
, [ ( "org-language" , "lisp" ) , ( "startFrom" , "10" ) ]
)
"(+ 2 2)\n"
]
% pandoc -f native -t org
[CodeBlock ("",["commonlisp","numberLines"],[("org-language","lisp"),("startFrom","20")]) "(+ 1 1)\n"
,CodeBlock ("",["commonlisp","numberLines","continuedSourceBlock"],[("org-language","lisp"),("startFrom","10")]) "(+ 2 2)\n"]
^D
#+begin_src lisp -n 20
(+ 1 1)
#+end_src
#+begin_src lisp +n 10
(+ 2 2)
#+end_src