From c998b937c14cb1f52b8a0ea40eb3ecb49c0c6f63 Mon Sep 17 00:00:00 2001 From: leungbk Date: Thu, 27 Dec 2018 01:09:32 -0800 Subject: Org writer: preserve line-numbering for example and code blocks. --- test/command/5178.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 test/command/5178.md (limited to 'test/command/5178.md') diff --git a/test/command/5178.md b/test/command/5178.md new file mode 100644 index 000000000..9df3f6cf8 --- /dev/null +++ b/test/command/5178.md @@ -0,0 +1,41 @@ +``` +% 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 +``` -- cgit v1.2.3