git.iko.soy/typeable/pandoc
on master help sign in
Removed "compatibility mode" when called as hsmarkdown.
c16efeaJohn MacFarlane
README−13
@@ -227,19 +227,6 @@ or [variables for ConTeXt].
227[`biber`]: https://ctan.org/pkg/biber
227[`biber`]: https://ctan.org/pkg/biber
228[TeX Live]: http://www.tug.org/texlive/
228[TeX Live]: http://www.tug.org/texlive/
229
229
230−`hsmarkdown`
231−------------
232−
233−A user who wants a drop-in replacement for `Markdown.pl` may create
234−a symbolic link to the `pandoc` executable called `hsmarkdown`. When
235−invoked under the name `hsmarkdown`, `pandoc` will behave as if
236−invoked with `-f markdown_strict --email-obfuscation=references`,
237−and all command-line options will be treated as regular arguments.
238−This approach does not work under [Cygwin], due to problems with
239−its simulation of symbolic links.
240−
241−[Cygwin]: https://cygwin.com
242−
243Options
230Options
244=======
231=======
245
232
pandoc.cabal+10−16
@@ -15,28 +15,22 @@ Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2
15Synopsis: Conversion between markup formats
15Synopsis: Conversion between markup formats
16Description: Pandoc is a Haskell library for converting from one markup
16Description: Pandoc is a Haskell library for converting from one markup
17 format to another, and a command-line tool that uses
17 format to another, and a command-line tool that uses
18− this library. It can read markdown and (subsets of) HTML,
18+ this library. It can read several dialects of Markdown and
19− reStructuredText, LaTeX, DocBook, MediaWiki markup, TWiki
19+ (subsets of) HTML, reStructuredText, LaTeX, DocBook,
20− markup, Haddock markup, OPML, Emacs Org-Mode, txt2tags,
20+ MediaWiki markup, TWiki markup, Haddock markup, OPML,
21− Word Docx, ODT, and Textile, and it can write
21+ Emacs Org-Mode, txt2tags, Word Docx, ODT, and Textile, and
22− Markdown, reStructuredText, XHTML, HTML 5, LaTeX,
22+ it can write Markdown, reStructuredText, XHTML, HTML 5,
23− ConTeXt, DocBook, OPML, OpenDocument, ODT,
23+ LaTeX, ConTeXt, DocBook, OPML, OpenDocument, ODT,
24 Word docx, RTF, MediaWiki, DokuWiki, Textile, groff man
24 Word docx, RTF, MediaWiki, DokuWiki, Textile, groff man
25 pages, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup,
25 pages, plain text, Emacs Org-Mode, AsciiDoc, Haddock markup,
26 EPUB (v2 and v3), FictionBook2, InDesign ICML, and several
26 EPUB (v2 and v3), FictionBook2, InDesign ICML, and several
27 kinds of HTML/javascript slide shows (S5, Slidy, Slideous,
27 kinds of HTML/javascript slide shows (S5, Slidy, Slideous,
28 DZSlides, reveal.js).
28 DZSlides, reveal.js).
29 .
29 .
30− Pandoc extends standard markdown syntax with footnotes,
31− embedded LaTeX, definition lists, tables, and other
32− features. A compatibility mode is provided for those
33− who need a drop-in replacement for Markdown.pl.
34− .
35− In contrast to existing tools for converting markdown
30+ In contrast to most existing tools for converting Markdown
36− to HTML, which use regex substitutions, pandoc has
37− a modular design: it consists of a set of readers,
31+ to HTML, pandoc has a modular design: it consists of a set of
38− which parse text in a given format and produce a native
32+ readers, which parse text in a given format and produce a
39− representation of the document, and a set of writers,
33+ native representation of the document, and a set of writers,
40 which convert this native representation into a target
34 which convert this native representation into a target
41 format. Thus, adding an input or output format requires
35 format. Thus, adding an input or output format requires
42 only adding a reader or writer.
36 only adding a reader or writer.
pandoc.hs+2−12
@@ -1047,25 +1047,15 @@ main = do
1047
1047
1048 rawArgs <- map UTF8.decodeArg <$> getArgs
1048 rawArgs <- map UTF8.decodeArg <$> getArgs
1049 prg <- getProgName
1049 prg <- getProgName
1050− let compatMode = prg == "hsmarkdown"
1051
1050
1052− let (actions, args, errors) = if compatMode
1053− then ([], rawArgs, [])
1054− else getOpt Permute options rawArgs
1051+ let (actions, args, errors) = getOpt Permute options rawArgs
1055
1052
1056 unless (null errors) $
1053 unless (null errors) $
1057 err 2 $ concat $ errors ++
1054 err 2 $ concat $ errors ++
1058 ["Try " ++ prg ++ " --help for more information."]
1055 ["Try " ++ prg ++ " --help for more information."]
1059
1056
1060− let defaultOpts' = if compatMode
1061− then defaultOpts { optReader = "markdown_strict"
1062− , optWriter = "html"
1063− , optEmailObfuscation =
1064− ReferenceObfuscation }
1065− else defaultOpts
1066−
1067 -- thread option data structure through all supplied option actions
1057 -- thread option data structure through all supplied option actions
1068− opts <- foldl (>>=) (return defaultOpts') actions
1058+ opts <- foldl (>>=) (return defaultOpts) actions
1069
1059
1070 let Opt { optTabStop = tabStop
1060 let Opt { optTabStop = tabStop
1071 , optPreserveTabs = preserveTabs
1061 , optPreserveTabs = preserveTabs