summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/HTML.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-06 23:33:23 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-06 23:33:23 +0100
commit47a16065c44eb5028ca9b9e86993fe880ef2a37d (patch)
tree87187306f99b0782fb7709a57491c774a5a168a3 /src/Text/Pandoc/Readers/HTML.hs
parentd1c16c4785b177fc71358595ef8e3ac9bb75b4ba (diff)
Removed --parse-raw and readerParseRaw.
These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index 0bb837ba9..219ee81b6 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -45,9 +45,9 @@ import qualified Text.Pandoc.Builder as B
import Text.Pandoc.Builder (Blocks, Inlines, trimInlines, HasMeta(..))
import Text.Pandoc.Shared ( extractSpaces, renderTags', addMetaField
, escapeURI, safeRead )
-import Text.Pandoc.Options (ReaderOptions(readerParseRaw),
- Verbosity(..), Extension (Ext_epub_html_exts,
- Ext_native_divs, Ext_native_spans))
+import Text.Pandoc.Options (ReaderOptions(readerExtensions), extensionEnabled,
+ Verbosity(..), Extension (Ext_epub_html_exts,
+ Ext_raw_html, Ext_native_divs, Ext_native_spans))
import Text.Pandoc.Parsing hiding ((<|>))
import Text.Pandoc.Walk
import qualified Data.Map as M
@@ -367,8 +367,8 @@ pDiv = try $ do
pRawHtmlBlock :: PandocMonad m => TagParser m Blocks
pRawHtmlBlock = do
raw <- pHtmlBlock "script" <|> pHtmlBlock "style" <|> pRawTag
- parseRaw <- getOption readerParseRaw
- if parseRaw && not (null raw)
+ exts <- getOption readerExtensions
+ if extensionEnabled Ext_raw_html exts && not (null raw)
then return $ B.rawBlock "html" raw
else return mempty
@@ -690,8 +690,8 @@ pRawHtmlInline = do
<|> if inplain
then pSatisfy (not . isBlockTag)
else pSatisfy isInlineTag
- parseRaw <- getOption readerParseRaw
- if parseRaw
+ exts <- getOption readerExtensions
+ if extensionEnabled Ext_raw_html exts
then return $ B.rawInline "html" $ renderTags' [result]
else return mempty