git.iko.soy/typeable/pandoc
on master help sign in
Org reader: use org-language attribute rather than data-org-language.
ac18ff9John MacFarlane
src/Text/Pandoc/Readers/Org/Shared.hs+1−1
@@ -76,7 +76,7 @@ originalLang lang =
76 let transLang = translateLang lang
76 let transLang = translateLang lang
77 in if transLang == lang
77 in if transLang == lang
78 then []
78 then []
79− else [("data-org-language", lang)]
79+ else [("org-language", lang)]
80
80
81-- | Translate from Org-mode's programming language identifiers to those used
81-- | Translate from Org-mode's programming language identifiers to those used
82-- by Pandoc. This is useful to allow for proper syntax highlighting in
82-- by Pandoc. This is useful to allow for proper syntax highlighting in
test/Tests/Readers/Org.hs+9−9
@@ -282,14 +282,14 @@ tests =
282 "src_emacs-lisp{(message \"Hello\")}" =?>
282 "src_emacs-lisp{(message \"Hello\")}" =?>
283 (para $ codeWith ( ""
283 (para $ codeWith ( ""
284 , [ "commonlisp" ]
284 , [ "commonlisp" ]
285− , [ ("data-org-language", "emacs-lisp") ])
285+ , [ ("org-language", "emacs-lisp") ])
286 "(message \"Hello\")")
286 "(message \"Hello\")")
287
287
288 , "Inline code block with arguments" =:
288 , "Inline code block with arguments" =:
289 "src_sh[:export both :results output]{echo 'Hello, World'}" =?>
289 "src_sh[:export both :results output]{echo 'Hello, World'}" =?>
290 (para $ codeWith ( ""
290 (para $ codeWith ( ""
291 , [ "bash" ]
291 , [ "bash" ]
292− , [ ("data-org-language", "sh")
292+ , [ ("org-language", "sh")
293 , ("export", "both")
293 , ("export", "both")
294 , ("results", "output")
294 , ("results", "output")
295 ]
295 ]
@@ -300,7 +300,7 @@ tests =
300 "src_sh[:toggle]{echo $HOME}" =?>
300 "src_sh[:toggle]{echo $HOME}" =?>
301 (para $ codeWith ( ""
301 (para $ codeWith ( ""
302 , [ "bash" ]
302 , [ "bash" ]
303− , [ ("data-org-language", "sh")
303+ , [ ("org-language", "sh")
304 , ("toggle", "yes")
304 , ("toggle", "yes")
305 ]
305 ]
306 )
306 )
@@ -1556,7 +1556,7 @@ tests =
1556 , " (+ 23 42))"
1556 , " (+ 23 42))"
1557 , "#+END_SRC" ] =?>
1557 , "#+END_SRC" ] =?>
1558 let classes = [ "commonlisp" ] -- as kate doesn't know emacs-lisp syntax
1558 let classes = [ "commonlisp" ] -- as kate doesn't know emacs-lisp syntax
1559− params = [ ("data-org-language", "emacs-lisp")
1559+ params = [ ("org-language", "emacs-lisp")
1560 , ("exports", "both")
1560 , ("exports", "both")
1561 ]
1561 ]
1562 code' = unlines [ "(progn (message \"Hello, World!\")"
1562 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1572,7 +1572,7 @@ tests =
1572 , "#+RESULTS:"
1572 , "#+RESULTS:"
1573 , ": 65"] =?>
1573 , ": 65"] =?>
1574 let classes = [ "commonlisp" ]
1574 let classes = [ "commonlisp" ]
1575− params = [ ("data-org-language", "emacs-lisp")
1575+ params = [ ("org-language", "emacs-lisp")
1576 , ("exports", "both")
1576 , ("exports", "both")
1577 ]
1577 ]
1578 code' = unlines [ "(progn (message \"Hello, World!\")"
1578 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1591,7 +1591,7 @@ tests =
1591 , "#+RESULTS:"
1591 , "#+RESULTS:"
1592 , ": 65" ] =?>
1592 , ": 65" ] =?>
1593 let classes = [ "commonlisp" ]
1593 let classes = [ "commonlisp" ]
1594− params = [ ("data-org-language", "emacs-lisp")
1594+ params = [ ("org-language", "emacs-lisp")
1595 , ("exports", "code")
1595 , ("exports", "code")
1596 ]
1596 ]
1597 code' = unlines [ "(progn (message \"Hello, World!\")"
1597 code' = unlines [ "(progn (message \"Hello, World!\")"
@@ -1625,7 +1625,7 @@ tests =
1625 , "#+END_SRC"
1625 , "#+END_SRC"
1626 ] =?>
1626 ] =?>
1627 let classes = [ "bash" ]
1627 let classes = [ "bash" ]
1628− params = [ ("data-org-language", "sh"), ("noeval", "yes") ]
1628+ params = [ ("org-language", "sh"), ("noeval", "yes") ]
1629 in codeBlockWith ("", classes, params) "echo $HOME\n"
1629 in codeBlockWith ("", classes, params) "echo $HOME\n"
1630
1630
1631 , "Source block with line number switch" =:
1631 , "Source block with line number switch" =:
@@ -1634,7 +1634,7 @@ tests =
1634 , "#+END_SRC"
1634 , "#+END_SRC"
1635 ] =?>
1635 ] =?>
1636 let classes = [ "bash", "numberLines" ]
1636 let classes = [ "bash", "numberLines" ]
1637− params = [ ("data-org-language", "sh"), ("startFrom", "10") ]
1637+ params = [ ("org-language", "sh"), ("startFrom", "10") ]
1638 in codeBlockWith ("", classes, params) ":() { :|:& };:\n"
1638 in codeBlockWith ("", classes, params) ":() { :|:& };:\n"
1639
1639
1640 , "Source block with multi-word parameter values" =:
1640 , "Source block with multi-word parameter values" =:
@@ -1793,7 +1793,7 @@ tests =
1793 , "code body"
1793 , "code body"
1794 , "#+END_SRC"
1794 , "#+END_SRC"
1795 ] =?>
1795 ] =?>
1796− let params = [ ("data-org-language", "C")
1796+ let params = [ ("org-language", "C")
1797 , ("tangle", "xxxx.c")
1797 , ("tangle", "xxxx.c")
1798 , ("city", "Zürich")
1798 , ("city", "Zürich")
1799 ]
1799 ]