git.iko.soy/typeable/pandoc
on master help sign in
Removed --enable, --disable options.
commit41e00757898c48b96edf297320edb1c1d2341a92 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 9 Aug 2012, 18:35 (14 years ago) parenta740de0
2 files changed+4−40
README+2−12 src/pandoc.hs+2−28
README+2−12
@@ -163,14 +163,6 @@ General options
163163 will be rendered as literate Haskell source: see [Literate Haskell
164164 support](#literate-haskell-support), below.
165165
166−`-e` *EXTENSION*, `--enable=`*EXTENSION*
167−: Enable the specified markdown syntax extension. For a list of extensions,
168− see [Pandoc's markdown](#pandocs-markdown), below.
169−
170−`-d` *EXTENSION*, `--disable=`*EXTENSION*
171−: Disable the specified markdown syntax extension. For a list of extensions,
172− see [Pandoc's markdown](#pandocs-markdown), below.
173−
174166`-o` *FILE*, `--output=`*FILE*
175167: Write output to *FILE* instead of *stdout*. If *FILE* is
176168 `-`, output will go to *stdout*. (Exception: if the output
@@ -773,9 +765,7 @@ Pandoc understands an extended and slightly revised version of
773765John Gruber's [markdown] syntax. This document explains the syntax,
774766noting differences from standard markdown. Except where noted, these
775767differences can be suppressed by specifying the `--strict` command-line
776−option. They can also be disabled piecemeal using the `--disable`
777−(or `-d`) option. If `--strict` is used, `--enable` (or `-e`) can be
778−used to turn on specific extensions.
768+option.
779769
780770Philosophy
781771----------
@@ -2175,7 +2165,7 @@ Non-pandoc extensions
21752165=====================
21762166
21772167The following markdown syntax extensions are not enabled by default
2178−in pandoc, but can be enabled using the `-e` (`--enable`) option:
2168+in pandoc.
21792169
21802170**Extension: `hard_line_breaks`**\
21812171Causes all newlines within a paragraph to be interpreted as hard line
src/pandoc.hs+2−28
@@ -134,7 +134,6 @@ data Opt = Opt
134134 , optDumpArgs :: Bool -- ^ Output command-line arguments
135135 , optIgnoreArgs :: Bool -- ^ Ignore command-line arguments
136136 , optStrict :: Bool -- ^ Use strict markdown syntax
137− , optExtensions :: [(Bool, Extension)]-- ^ Extensions to enable/disable
138137 , optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst
139138 , optWrapText :: Bool -- ^ Wrap text
140139 , optColumns :: Int -- ^ Line length in characters
@@ -188,7 +187,6 @@ defaultOpts = Opt
188187 , optDumpArgs = False
189188 , optIgnoreArgs = False
190189 , optStrict = False
191− , optExtensions = []
192190 , optReferenceLinks = False
193191 , optWrapText = True
194192 , optColumns = 72
@@ -242,24 +240,6 @@ options =
242240 (\opt -> return opt { optStrict = True } ))
243241 "" -- "Disable markdown syntax extensions"
244242
245− , Option "e" ["enable"]
246− (ReqArg
247− (\arg opt -> do
248− ext <- readExtension arg
249− return opt { optExtensions =
250− (True,ext) : optExtensions opt } )
251− "EXTENSION")
252− "" -- "Enable specific markdown syntax extensions"
253−
254− , Option "d" ["disable"]
255− (ReqArg
256− (\arg opt -> do
257− ext <- readExtension arg
258− return opt { optExtensions =
259− (False,ext) : optExtensions opt } )
260− "EXTENSION")
261− "" -- "Disable specific markdown syntax extensions"
262−
263243 , Option "R" ["parse-raw"]
264244 (NoArg
265245 (\opt -> return opt { optParseRaw = True }))
@@ -840,7 +820,6 @@ main = do
840820 , optDumpArgs = dumpArgs
841821 , optIgnoreArgs = ignoreArgs
842822 , optStrict = strict
843− , optExtensions = exts
844823 , optReferenceLinks = referenceLinks
845824 , optWrapText = wrap
846825 , optColumns = columns
@@ -967,12 +946,7 @@ main = do
967946 then strictExtensions
968947 else pandocExtensions
969948
970− let extensions = foldl (\acc (inc,ext) -> if inc
971− then Set.insert ext acc
972− else Set.delete ext acc)
973− defaultExts exts
974−
975− let readerOpts = def{ readerExtensions = extensions
949+ let readerOpts = def{ readerExtensions = defaultExts
976950 , readerSmart = smart || (texLigatures &&
977951 (laTeXOutput || writerName' == "context"))
978952 , readerStandalone = standalone'
@@ -998,7 +972,7 @@ main = do
998972 writerIgnoreNotes = False,
999973 writerNumberSections = numberSections,
1000974 writerSectionDivs = sectionDivs,
1001− writerExtensions = extensions,
975+ writerExtensions = defaultExts,
1002976 writerReferenceLinks = referenceLinks,
1003977 writerWrapText = wrap,
1004978 writerColumns = columns,