git.iko.soy/typeable/pandoc
on master help sign in
Org reader: read HTML_head as header-includes
28d17eaAlbert Krewinkel
src/Text/Pandoc/Readers/Org/Meta.hs+2
@@ -82,6 +82,8 @@ metaValue key =
82 -- pandoc does not.
82 -- pandoc does not.
83 "latex_class_options" -> ("classoption",) <$>
83 "latex_class_options" -> ("classoption",) <$>
84 metaModifiedString (filter (`notElem` "[]"))
84 metaModifiedString (filter (`notElem` "[]"))
85+ "html_head" -> (inclKey,) <$>
86+ accumulatingList inclKey (metaExportSnippet "html")
85 _ -> (key,) <$> metaString
87 _ -> (key,) <$> metaString
86
88
87metaInlines :: OrgParser (F MetaValue)
89metaInlines :: OrgParser (F MetaValue)
tests/Tests/Readers/Org.hs+7
@@ -513,6 +513,13 @@ tests =
513 let meta = setMeta "classoption" (MetaString "a4paper") nullMeta
513 let meta = setMeta "classoption" (MetaString "a4paper") nullMeta
514 in Pandoc meta mempty
514 in Pandoc meta mempty
515
515
516+ , "LaTeX_class_options is translated to classoption" =:
517+ "#+html_head: <meta/>" =?>
518+ let html = rawInline "html" "<meta/>"
519+ inclList = MetaList [MetaInlines (toList html)]
520+ meta = setMeta "header-includes" inclList nullMeta
521+ in Pandoc meta mempty
522+
516 , "later meta definitions take precedence" =:
523 , "later meta definitions take precedence" =:
517 unlines [ "#+AUTHOR: this will not be used"
524 unlines [ "#+AUTHOR: this will not be used"
518 , "#+author: Max"
525 , "#+author: Max"