git.iko.soy/typeable/pandoc
on master help sign in
Changed strict to markdown_strict.
commit8d65651309ba99b0cd8f725f91fdada62f5eb955 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 9 Aug 2012, 22:30 (14 years ago) parent05216d2
4 files changed+18−15
README+9−9 src/Text/Pandoc.hs+3−3 src/Text/Pandoc/Templates.hs+4−1 src/pandoc.hs+2−2
README+9−9
@@ -26,8 +26,8 @@ tables, flexible ordered lists, definition lists, delimited code blocks,
2626superscript, subscript, strikeout, title blocks, automatic tables of
2727contents, embedded LaTeX math, citations, and markdown inside HTML block
2828elements. (These enhancements, described below under
29−[Pandoc's markdown](#pandocs-markdown), can be disabled using the `strict`
30−input or output format.)
29+[Pandoc's markdown](#pandocs-markdown), can be disabled using the
30+`markdown_strict` input or output format.)
3131
3232In contrast to most existing tools for converting markdown to HTML, which
3333use regex substitutions, Pandoc has a modular design: it consists of a
@@ -118,7 +118,7 @@ and `xunicode` (if `xelatex` is used).
118118A user who wants a drop-in replacement for `Markdown.pl` may create
119119a symbolic link to the `pandoc` executable called `hsmarkdown`. When
120120invoked under the name `hsmarkdown`, `pandoc` will behave as if
121−invoked with `-f strict --email-obfuscation=references`,
121+invoked with `-f markdown_strict --email-obfuscation=references`,
122122and all command-line options will be treated as regular arguments.
123123However, this approach does not work under Cygwin, due to problems with
124124its simulation of symbolic links.
@@ -757,7 +757,7 @@ Pandoc's markdown
757757Pandoc understands an extended and slightly revised version of
758758John Gruber's [markdown] syntax. This document explains the syntax,
759759noting differences from standard markdown. Except where noted, these
760−differences can be suppressed by using the `strict` format instead
760+differences can be suppressed by using the `markdown_strict` format instead
761761of `markdown`.
762762
763763Philosophy
@@ -927,7 +927,7 @@ Standard markdown syntax does not require a blank line before a block
927927quote. Pandoc does require this (except, of course, at the beginning of the
928928document). The reason for the requirement is that it is all too easy for a
929929`>` to end up at the beginning of a line by accident (perhaps through line
930−wrapping). So, unless the `strict` format is used, the following does
930+wrapping). So, unless the `markdown_strict` format is used, the following does
931931not produce a nested block quote in pandoc:
932932
933933 > This is a block quote.
@@ -1284,7 +1284,7 @@ around "Third". Pandoc follows a simple rule: if the text is followed by
12841284a blank line, it is treated as a paragraph. Since "Second" is followed
12851285by a list, and not a blank line, it isn't treated as a paragraph. The
12861286fact that the list is followed by a blank line is irrelevant. (Note:
1287−Pandoc works this way even when the `strict` format is specified. This
1287+Pandoc works this way even when the `markdown_strict` format is specified. This
12881288behavior is consistent with the official markdown syntax description,
12891289even though it is different from that of `Markdown.pl`.)
12901290
@@ -1605,7 +1605,7 @@ which allows only the following characters to be backslash-escaped:
16051605
16061606 \`*_{}[]()>#+-.!
16071607
1608−(However, if the `strict` format is used, the standard markdown rule
1608+(However, if the `markdown_strict` format is used, the standard markdown rule
16091609will be used.)
16101610
16111611A backslash-escaped space is parsed as a nonbreaking space. It will
@@ -1840,8 +1840,8 @@ with blank lines, and start and end at the left margin. Within
18401840these blocks, everything is interpreted as HTML, not markdown;
18411841so (for example), `*` does not signify emphasis.
18421842
1843−Pandoc behaves this way when the `strict` format is used; but by default,
1844−pandoc interprets material between HTML block tags as markdown.
1843+Pandoc behaves this way when the `markdown_strict` format is used; but
1844+by default, pandoc interprets material between HTML block tags as markdown.
18451845Thus, for example, Pandoc will turn
18461846
18471847 <table>
src/Text/Pandoc.hs+3−3
@@ -176,7 +176,7 @@ parseFormatSpec = parse formatSpec ""
176176readers :: [(String, ReaderOptions -> String -> Pandoc)]
177177readers = [("native" , \_ -> readNative)
178178 ,("json" , \_ -> decodeJSON)
179− ,("strict" , readMarkdown)
179+ ,("markdown_strict" , readMarkdown)
180180 ,("markdown" , readMarkdown)
181181 ,("rst" , readRST)
182182 ,("docbook" , readDocBook)
@@ -220,7 +220,7 @@ writers = [
220220 ,("texinfo" , PureStringWriter writeTexinfo)
221221 ,("man" , PureStringWriter writeMan)
222222 ,("markdown" , PureStringWriter writeMarkdown)
223− ,("strict" , PureStringWriter writeMarkdown)
223+ ,("markdown_strict" , PureStringWriter writeMarkdown)
224224 ,("plain" , PureStringWriter writePlain)
225225 ,("rst" , PureStringWriter writeRST)
226226 ,("mediawiki" , PureStringWriter writeMediaWiki)
@@ -231,7 +231,7 @@ writers = [
231231 ]
232232
233233getDefaultExtensions :: String -> Set Extension
234−getDefaultExtensions "strict" = strictExtensions
234+getDefaultExtensions "markdown_strict" = strictExtensions
235235getDefaultExtensions _ = pandocExtensions
236236
237237-- | Retrieve reader based on formatSpec (format+extensions).
src/Text/Pandoc/Templates.hs+4−1
@@ -92,8 +92,11 @@ getDefaultTemplate user writer = do
9292 "native" -> return $ Right ""
9393 "json" -> return $ Right ""
9494 "docx" -> return $ Right ""
95− "odt" -> getDefaultTemplate user "opendocument"
9695 "epub" -> return $ Right ""
96+ "odt" -> getDefaultTemplate user "opendocument"
97+ "markdown_strict" -> getDefaultTemplate user "markdown"
98+ "multimarkdown" -> getDefaultTemplate user "markdown"
99+ "markdown_github" -> getDefaultTemplate user "markdown"
97100 _ -> let fname = "templates" </> "default" <.> format
98101 in E.try $ readDataFile user fname
99102
src/pandoc.hs+2−2
@@ -236,7 +236,7 @@ options =
236236 (NoArg
237237 (\opt -> do
238238 err 59 $ "The --strict option has been removed.\n" ++
239− "Use `strict' input or output format instead."
239+ "Use `markdown_strict' input or output format instead."
240240 return opt ))
241241 "" -- "Disable markdown syntax extensions"
242242
@@ -782,7 +782,7 @@ main = do
782782 ["Try " ++ prg ++ " --help for more information."]
783783
784784 let defaultOpts' = if compatMode
785− then defaultOpts { optReader = "strict"
785+ then defaultOpts { optReader = "markdown_strict"
786786 , optWriter = "html"
787787 , optEmailObfuscation =
788788 ReferenceObfuscation }