git.iko.soy/typeable/pandoc
on master help sign in
Org reader: use org-language attribute rather than data-org-language.
commitac18ff90b22c2a8f8b829acb9139477ee7b02954 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 9 Aug 2017, 09:45 (9 years ago) parent96933c6
2 files changed+10−10
src/Text/Pandoc/Readers/Org/Shared.hs+1−1 test/Tests/Readers/Org.hs+9−9
src/Text/Pandoc/Readers/Org/Shared.hs+1−1
@@ -76,7 +76,7 @@ originalLang lang =
7676 let transLang = translateLang lang
7777 in if transLang == lang
7878 then []
79− else [("data-org-language", lang)]
79+ else [("org-language", lang)]
8080
8181-- | Translate from Org-mode's programming language identifiers to those used
8282-- by Pandoc. This is useful to allow for proper syntax highlighting in
test/Tests/Readers/Org.hs+9−9
@@ -282,14 +282,14 @@ tests =
282282 "src_emacs-lisp{(message \"Hello\")}" =?>
283283 (para $ codeWith ( ""
284284 , [ "commonlisp" ]
285− , [ ("data-org-language", "emacs-lisp") ])
285+ , [ ("org-language", "emacs-lisp") ])
286286 "(message \"Hello\")")
287287
288288 , "Inline code block with arguments" =:
289289 "src_sh[:export both :results output]{echo 'Hello, World'}" =?>
290290 (para $ codeWith ( ""
291291 , [ "bash" ]
292− , [ ("data-org-language", "sh")
292+ , [ ("org-language", "sh")
293293 , ("export", "both")
294294 , ("results", "output")
295295 ]
@@ -300,7 +300,7 @@ tests =
300300 "src_sh[:toggle]{echo $HOME}" =?>
301301 (para $ codeWith ( ""
302302 , [ "bash" ]
303− , [ ("data-org-language", "sh")
303+ , [ ("org-language", "sh")
304304 , ("toggle", "yes")
305305 ]
306306 )
@@ -1556,7 +1556,7 @@ tests =
15561556 , " (+ 23 42))"
15571557 , "#+END_SRC" ] =?>
15581558 let classes = [ "commonlisp" ] -- as kate doesn't know emacs-lisp syntax
1559− params = [ ("data-org-language", "emacs-lisp")
1559+ params = [ ("org-language", "emacs-lisp")
15601560 , ("exports", "both")
15611561 ]
15621562 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1572,7 +1572,7 @@ tests =
15721572 , "#+RESULTS:"
15731573 , ": 65"] =?>
15741574 let classes = [ "commonlisp" ]
1575− params = [ ("data-org-language", "emacs-lisp")
1575+ params = [ ("org-language", "emacs-lisp")
15761576 , ("exports", "both")
15771577 ]
15781578 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1591,7 +1591,7 @@ tests =
15911591 , "#+RESULTS:"
15921592 , ": 65" ] =?>
15931593 let classes = [ "commonlisp" ]
1594− params = [ ("data-org-language", "emacs-lisp")
1594+ params = [ ("org-language", "emacs-lisp")
15951595 , ("exports", "code")
15961596 ]
15971597 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1625,7 +1625,7 @@ tests =
16251625 , "#+END_SRC"
16261626 ] =?>
16271627 let classes = [ "bash" ]
1628− params = [ ("data-org-language", "sh"), ("noeval", "yes") ]
1628+ params = [ ("org-language", "sh"), ("noeval", "yes") ]
16291629 in codeBlockWith ("", classes, params) "echo $HOME\n"
16301630
16311631 , "Source block with line number switch" =:
@@ -1634,7 +1634,7 @@ tests =
16341634 , "#+END_SRC"
16351635 ] =?>
16361636 let classes = [ "bash", "numberLines" ]
1637− params = [ ("data-org-language", "sh"), ("startFrom", "10") ]
1637+ params = [ ("org-language", "sh"), ("startFrom", "10") ]
16381638 in codeBlockWith ("", classes, params) ":() { :|:& };:\n"
16391639
16401640 , "Source block with multi-word parameter values" =:
@@ -1793,7 +1793,7 @@ tests =
17931793 , "code body"
17941794 , "#+END_SRC"
17951795 ] =?>
1796− let params = [ ("data-org-language", "C")
1796+ let params = [ ("org-language", "C")
17971797 , ("tangle", "xxxx.c")
17981798 , ("city", "Zürich")
17991799 ]