aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorleungbk <bkleung89@gmail.com>2018-12-27 01:09:32 -0800
committerAlbert Krewinkel <albert+github@zeitkraut.de>2018-12-28 15:07:05 +0100
commitc998b937c14cb1f52b8a0ea40eb3ecb49c0c6f63 (patch)
treec0d68f7958880b0e481fa81eac51adb6f5e0de77 /test
parent053c683d35a985844c81ff2683cd1e3b4cffcc15 (diff)
downloadpandoc-c998b937c14cb1f52b8a0ea40eb3ecb49c0c6f63.tar.gz
Org writer: preserve line-numbering for example and code blocks.
Diffstat (limited to 'test')
-rw-r--r--test/command/5178.md41
1 files changed, 41 insertions, 0 deletions
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
+```