summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-08-09 18:35:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-08-09 18:38:02 -0700
commit41e00757898c48b96edf297320edb1c1d2341a92 (patch)
treee8412ca87e783f6e16c3e3b2e5fee39260d7cbd4
parenta740de05086960eb6d926f68acd43fedb4599f6c (diff)
Removed --enable, --disable options.
-rw-r--r--README14
-rw-r--r--src/pandoc.hs30
2 files changed, 4 insertions, 40 deletions
diff --git a/README b/README
index fd1d19ede..064c3277b 100644
--- a/README
+++ b/README
@@ -163,14 +163,6 @@ General options
will be rendered as literate Haskell source: see [Literate Haskell
support](#literate-haskell-support), below.
-`-e` *EXTENSION*, `--enable=`*EXTENSION*
-: Enable the specified markdown syntax extension. For a list of extensions,
- see [Pandoc's markdown](#pandocs-markdown), below.
-
-`-d` *EXTENSION*, `--disable=`*EXTENSION*
-: Disable the specified markdown syntax extension. For a list of extensions,
- see [Pandoc's markdown](#pandocs-markdown), below.
-
`-o` *FILE*, `--output=`*FILE*
: Write output to *FILE* instead of *stdout*. If *FILE* is
`-`, output will go to *stdout*. (Exception: if the output
@@ -773,9 +765,7 @@ Pandoc understands an extended and slightly revised version of
John Gruber's [markdown] syntax. This document explains the syntax,
noting differences from standard markdown. Except where noted, these
differences can be suppressed by specifying the `--strict` command-line
-option. They can also be disabled piecemeal using the `--disable`
-(or `-d`) option. If `--strict` is used, `--enable` (or `-e`) can be
-used to turn on specific extensions.
+option.
Philosophy
----------
@@ -2175,7 +2165,7 @@ Non-pandoc extensions
=====================
The following markdown syntax extensions are not enabled by default
-in pandoc, but can be enabled using the `-e` (`--enable`) option:
+in pandoc.
**Extension: `hard_line_breaks`**\
Causes all newlines within a paragraph to be interpreted as hard line
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 094be39eb..13e3e2021 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -134,7 +134,6 @@ data Opt = Opt
, optDumpArgs :: Bool -- ^ Output command-line arguments
, optIgnoreArgs :: Bool -- ^ Ignore command-line arguments
, optStrict :: Bool -- ^ Use strict markdown syntax
- , optExtensions :: [(Bool, Extension)]-- ^ Extensions to enable/disable
, optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst
, optWrapText :: Bool -- ^ Wrap text
, optColumns :: Int -- ^ Line length in characters
@@ -188,7 +187,6 @@ defaultOpts = Opt
, optDumpArgs = False
, optIgnoreArgs = False
, optStrict = False
- , optExtensions = []
, optReferenceLinks = False
, optWrapText = True
, optColumns = 72
@@ -242,24 +240,6 @@ options =
(\opt -> return opt { optStrict = True } ))
"" -- "Disable markdown syntax extensions"
- , Option "e" ["enable"]
- (ReqArg
- (\arg opt -> do
- ext <- readExtension arg
- return opt { optExtensions =
- (True,ext) : optExtensions opt } )
- "EXTENSION")
- "" -- "Enable specific markdown syntax extensions"
-
- , Option "d" ["disable"]
- (ReqArg
- (\arg opt -> do
- ext <- readExtension arg
- return opt { optExtensions =
- (False,ext) : optExtensions opt } )
- "EXTENSION")
- "" -- "Disable specific markdown syntax extensions"
-
, Option "R" ["parse-raw"]
(NoArg
(\opt -> return opt { optParseRaw = True }))
@@ -840,7 +820,6 @@ main = do
, optDumpArgs = dumpArgs
, optIgnoreArgs = ignoreArgs
, optStrict = strict
- , optExtensions = exts
, optReferenceLinks = referenceLinks
, optWrapText = wrap
, optColumns = columns
@@ -967,12 +946,7 @@ main = do
then strictExtensions
else pandocExtensions
- let extensions = foldl (\acc (inc,ext) -> if inc
- then Set.insert ext acc
- else Set.delete ext acc)
- defaultExts exts
-
- let readerOpts = def{ readerExtensions = extensions
+ let readerOpts = def{ readerExtensions = defaultExts
, readerSmart = smart || (texLigatures &&
(laTeXOutput || writerName' == "context"))
, readerStandalone = standalone'
@@ -998,7 +972,7 @@ main = do
writerIgnoreNotes = False,
writerNumberSections = numberSections,
writerSectionDivs = sectionDivs,
- writerExtensions = extensions,
+ writerExtensions = defaultExts,
writerReferenceLinks = referenceLinks,
writerWrapText = wrap,
writerColumns = columns,