git.iko.soy/typeable/pandoc
on master help sign in
Removed --enable, --disable options.
41e0075John MacFarlane
README+2−12
@@ -163,14 +163,6 @@ General options
163 will be rendered as literate Haskell source: see [Literate Haskell
163 will be rendered as literate Haskell source: see [Literate Haskell
164 support](#literate-haskell-support), below.
164 support](#literate-haskell-support), below.
165
165
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−
174`-o` *FILE*, `--output=`*FILE*
166`-o` *FILE*, `--output=`*FILE*
175: Write output to *FILE* instead of *stdout*. If *FILE* is
167: Write output to *FILE* instead of *stdout*. If *FILE* is
176 `-`, output will go to *stdout*. (Exception: if the output
168 `-`, output will go to *stdout*. (Exception: if the output
@@ -773,9 +765,7 @@ Pandoc understands an extended and slightly revised version of
773John Gruber's [markdown] syntax. This document explains the syntax,
765John Gruber's [markdown] syntax. This document explains the syntax,
774noting differences from standard markdown. Except where noted, these
766noting differences from standard markdown. Except where noted, these
775differences can be suppressed by specifying the `--strict` command-line
767differences can be suppressed by specifying the `--strict` command-line
776−option. They can also be disabled piecemeal using the `--disable`
768+option.
777−(or `-d`) option. If `--strict` is used, `--enable` (or `-e`) can be
778−used to turn on specific extensions.
779
769
780Philosophy
770Philosophy
781----------
771----------
@@ -2175,7 +2165,7 @@ Non-pandoc extensions
2175=====================
2165=====================
2176
2166
2177The following markdown syntax extensions are not enabled by default
2167The following markdown syntax extensions are not enabled by default
2178−in pandoc, but can be enabled using the `-e` (`--enable`) option:
2168+in pandoc.
2179
2169
2180**Extension: `hard_line_breaks`**\
2170**Extension: `hard_line_breaks`**\
2181Causes all newlines within a paragraph to be interpreted as hard line
2171Causes all newlines within a paragraph to be interpreted as hard line
src/pandoc.hs+2−28
@@ -134,7 +134,6 @@ data Opt = Opt
134 , optDumpArgs :: Bool -- ^ Output command-line arguments
134 , optDumpArgs :: Bool -- ^ Output command-line arguments
135 , optIgnoreArgs :: Bool -- ^ Ignore command-line arguments
135 , optIgnoreArgs :: Bool -- ^ Ignore command-line arguments
136 , optStrict :: Bool -- ^ Use strict markdown syntax
136 , optStrict :: Bool -- ^ Use strict markdown syntax
137− , optExtensions :: [(Bool, Extension)]-- ^ Extensions to enable/disable
138 , optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst
137 , optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst
139 , optWrapText :: Bool -- ^ Wrap text
138 , optWrapText :: Bool -- ^ Wrap text
140 , optColumns :: Int -- ^ Line length in characters
139 , optColumns :: Int -- ^ Line length in characters
@@ -188,7 +187,6 @@ defaultOpts = Opt
188 , optDumpArgs = False
187 , optDumpArgs = False
189 , optIgnoreArgs = False
188 , optIgnoreArgs = False
190 , optStrict = False
189 , optStrict = False
191− , optExtensions = []
192 , optReferenceLinks = False
190 , optReferenceLinks = False
193 , optWrapText = True
191 , optWrapText = True
194 , optColumns = 72
192 , optColumns = 72
@@ -242,24 +240,6 @@ options =
242 (\opt -> return opt { optStrict = True } ))
240 (\opt -> return opt { optStrict = True } ))
243 "" -- "Disable markdown syntax extensions"
241 "" -- "Disable markdown syntax extensions"
244
242
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−
263 , Option "R" ["parse-raw"]
243 , Option "R" ["parse-raw"]
264 (NoArg
244 (NoArg
265 (\opt -> return opt { optParseRaw = True }))
245 (\opt -> return opt { optParseRaw = True }))
@@ -840,7 +820,6 @@ main = do
840 , optDumpArgs = dumpArgs
820 , optDumpArgs = dumpArgs
841 , optIgnoreArgs = ignoreArgs
821 , optIgnoreArgs = ignoreArgs
842 , optStrict = strict
822 , optStrict = strict
843− , optExtensions = exts
844 , optReferenceLinks = referenceLinks
823 , optReferenceLinks = referenceLinks
845 , optWrapText = wrap
824 , optWrapText = wrap
846 , optColumns = columns
825 , optColumns = columns
@@ -967,12 +946,7 @@ main = do
967 then strictExtensions
946 then strictExtensions
968 else pandocExtensions
947 else pandocExtensions
969
948
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
976 , readerSmart = smart || (texLigatures &&
950 , readerSmart = smart || (texLigatures &&
977 (laTeXOutput || writerName' == "context"))
951 (laTeXOutput || writerName' == "context"))
978 , readerStandalone = standalone'
952 , readerStandalone = standalone'
@@ -998,7 +972,7 @@ main = do
998 writerIgnoreNotes = False,
972 writerIgnoreNotes = False,
999 writerNumberSections = numberSections,
973 writerNumberSections = numberSections,
1000 writerSectionDivs = sectionDivs,
974 writerSectionDivs = sectionDivs,
1001− writerExtensions = extensions,
975+ writerExtensions = defaultExts,
1002 writerReferenceLinks = referenceLinks,
976 writerReferenceLinks = referenceLinks,
1003 writerWrapText = wrap,
977 writerWrapText = wrap,
1004 writerColumns = columns,
978 writerColumns = columns,