@@ -2,7 +2,7 @@
22{-# LANGUAGE RecordWildCards #-}
33{-# LANGUAGE ViewPatterns #-}
44{-
5−Copyright (C) 2014-2016 Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
5+Copyright (C) 2014-2017 Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
66
77This program is free software; you can redistribute it and/or modify
88it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2121
2222{- |
2323 Module : Text.Pandoc.Readers.Org.Options
24− Copyright : Copyright (C) 2014-2016 Albert Krewinkel
24+ Copyright : Copyright (C) 2014-2017 Albert Krewinkel
2525 License : GNU GPL, version 2 or above
2626
2727 Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
@@ -35,7 +35,7 @@ module Text.Pandoc.Readers.Org.Blocks
3535
3636import Text.Pandoc.Readers.Org.BlockStarts
3737import Text.Pandoc.Readers.Org.Inlines
38−import Text.Pandoc.Readers.Org.Meta ( metaExport, metaLine )
38+import Text.Pandoc.Readers.Org.Meta ( metaExport, metaKey, metaLine )
3939import Text.Pandoc.Readers.Org.ParserState
4040import Text.Pandoc.Readers.Org.Parsing
4141import Text.Pandoc.Readers.Org.Shared
@@ -679,7 +679,15 @@ exampleCode = B.codeBlockWith ("", ["example"], [])
679679--
680680
681681specialLine :: OrgParser (F Blocks)
682−specialLine = fmap return . try $ metaLine <|> commentLine
682+specialLine = fmap return . try $ rawExportLine <|> metaLine <|> commentLine
683+
684+rawExportLine :: OrgParser Blocks
685+rawExportLine = try $ do
686+ metaLineStart
687+ key <- metaKey
688+ if key `elem` ["latex", "html", "texinfo", "beamer"]
689+ then B.rawBlock key <$> anyLine
690+ else mzero
683691
684692commentLine :: OrgParser Blocks
685693commentLine = commentLineStart *> anyLine *> pure mempty