git.iko.soy/typeable/pandoc
on master help sign in
Changed strict to markdown_strict.
8d65651John MacFarlane
README+9−9
@@ -26,8 +26,8 @@ tables, flexible ordered lists, definition lists, delimited code blocks,
26superscript, subscript, strikeout, title blocks, automatic tables of
26superscript, subscript, strikeout, title blocks, automatic tables of
27contents, embedded LaTeX math, citations, and markdown inside HTML block
27contents, embedded LaTeX math, citations, and markdown inside HTML block
28elements. (These enhancements, described below under
28elements. (These enhancements, described below under
29−[Pandoc's markdown](#pandocs-markdown), can be disabled using the `strict`
29+[Pandoc's markdown](#pandocs-markdown), can be disabled using the
30−input or output format.)
30+`markdown_strict` input or output format.)
31
31
32In contrast to most existing tools for converting markdown to HTML, which
32In contrast to most existing tools for converting markdown to HTML, which
33use regex substitutions, Pandoc has a modular design: it consists of a
33use regex substitutions, Pandoc has a modular design: it consists of a
@@ -118,7 +118,7 @@ and `xunicode` (if `xelatex` is used).
118A user who wants a drop-in replacement for `Markdown.pl` may create
118A user who wants a drop-in replacement for `Markdown.pl` may create
119a symbolic link to the `pandoc` executable called `hsmarkdown`. When
119a symbolic link to the `pandoc` executable called `hsmarkdown`. When
120invoked under the name `hsmarkdown`, `pandoc` will behave as if
120invoked 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`,
122and all command-line options will be treated as regular arguments.
122and all command-line options will be treated as regular arguments.
123However, this approach does not work under Cygwin, due to problems with
123However, this approach does not work under Cygwin, due to problems with
124its simulation of symbolic links.
124its simulation of symbolic links.
@@ -757,7 +757,7 @@ Pandoc's markdown
757Pandoc understands an extended and slightly revised version of
757Pandoc understands an extended and slightly revised version of
758John Gruber's [markdown] syntax. This document explains the syntax,
758John Gruber's [markdown] syntax. This document explains the syntax,
759noting differences from standard markdown. Except where noted, these
759noting 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
761of `markdown`.
761of `markdown`.
762
762
763Philosophy
763Philosophy
@@ -927,7 +927,7 @@ Standard markdown syntax does not require a blank line before a block
927quote. Pandoc does require this (except, of course, at the beginning of the
927quote. Pandoc does require this (except, of course, at the beginning of the
928document). The reason for the requirement is that it is all too easy for a
928document). The reason for the requirement is that it is all too easy for a
929`>` to end up at the beginning of a line by accident (perhaps through line
929`>` 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
931not produce a nested block quote in pandoc:
931not produce a nested block quote in pandoc:
932
932
933 > This is a block quote.
933 > This is a block quote.
@@ -1284,7 +1284,7 @@ around "Third". Pandoc follows a simple rule: if the text is followed by
1284a blank line, it is treated as a paragraph. Since "Second" is followed
1284a blank line, it is treated as a paragraph. Since "Second" is followed
1285by a list, and not a blank line, it isn't treated as a paragraph. The
1285by a list, and not a blank line, it isn't treated as a paragraph. The
1286fact that the list is followed by a blank line is irrelevant. (Note:
1286fact 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
1288behavior is consistent with the official markdown syntax description,
1288behavior is consistent with the official markdown syntax description,
1289even though it is different from that of `Markdown.pl`.)
1289even though it is different from that of `Markdown.pl`.)
1290
1290
@@ -1605,7 +1605,7 @@ which allows only the following characters to be backslash-escaped:
1605
1605
1606 \`*_{}[]()>#+-.!
1606 \`*_{}[]()>#+-.!
1607
1607
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
1609will be used.)
1609will be used.)
1610
1610
1611A backslash-escaped space is parsed as a nonbreaking space. It will
1611A 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
1840these blocks, everything is interpreted as HTML, not markdown;
1840these blocks, everything is interpreted as HTML, not markdown;
1841so (for example), `*` does not signify emphasis.
1841so (for example), `*` does not signify emphasis.
1842
1842
1843−Pandoc behaves this way when the `strict` format is used; but by default,
1843+Pandoc behaves this way when the `markdown_strict` format is used; but
1844−pandoc interprets material between HTML block tags as markdown.
1844+by default, pandoc interprets material between HTML block tags as markdown.
1845Thus, for example, Pandoc will turn
1845Thus, for example, Pandoc will turn
1846
1846
1847 <table>
1847 <table>
src/Text/Pandoc.hs+3−3
@@ -176,7 +176,7 @@ parseFormatSpec = parse formatSpec ""
176readers :: [(String, ReaderOptions -> String -> Pandoc)]
176readers :: [(String, ReaderOptions -> String -> Pandoc)]
177readers = [("native" , \_ -> readNative)
177readers = [("native" , \_ -> readNative)
178 ,("json" , \_ -> decodeJSON)
178 ,("json" , \_ -> decodeJSON)
179− ,("strict" , readMarkdown)
179+ ,("markdown_strict" , readMarkdown)
180 ,("markdown" , readMarkdown)
180 ,("markdown" , readMarkdown)
181 ,("rst" , readRST)
181 ,("rst" , readRST)
182 ,("docbook" , readDocBook)
182 ,("docbook" , readDocBook)
@@ -220,7 +220,7 @@ writers = [
220 ,("texinfo" , PureStringWriter writeTexinfo)
220 ,("texinfo" , PureStringWriter writeTexinfo)
221 ,("man" , PureStringWriter writeMan)
221 ,("man" , PureStringWriter writeMan)
222 ,("markdown" , PureStringWriter writeMarkdown)
222 ,("markdown" , PureStringWriter writeMarkdown)
223− ,("strict" , PureStringWriter writeMarkdown)
223+ ,("markdown_strict" , PureStringWriter writeMarkdown)
224 ,("plain" , PureStringWriter writePlain)
224 ,("plain" , PureStringWriter writePlain)
225 ,("rst" , PureStringWriter writeRST)
225 ,("rst" , PureStringWriter writeRST)
226 ,("mediawiki" , PureStringWriter writeMediaWiki)
226 ,("mediawiki" , PureStringWriter writeMediaWiki)
@@ -231,7 +231,7 @@ writers = [
231 ]
231 ]
232
232
233getDefaultExtensions :: String -> Set Extension
233getDefaultExtensions :: String -> Set Extension
234−getDefaultExtensions "strict" = strictExtensions
234+getDefaultExtensions "markdown_strict" = strictExtensions
235getDefaultExtensions _ = pandocExtensions
235getDefaultExtensions _ = pandocExtensions
236
236
237-- | Retrieve reader based on formatSpec (format+extensions).
237-- | Retrieve reader based on formatSpec (format+extensions).
src/Text/Pandoc/Templates.hs+4−1
@@ -92,8 +92,11 @@ getDefaultTemplate user writer = do
92 "native" -> return $ Right ""
92 "native" -> return $ Right ""
93 "json" -> return $ Right ""
93 "json" -> return $ Right ""
94 "docx" -> return $ Right ""
94 "docx" -> return $ Right ""
95− "odt" -> getDefaultTemplate user "opendocument"
96 "epub" -> return $ Right ""
95 "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"
97 _ -> let fname = "templates" </> "default" <.> format
100 _ -> let fname = "templates" </> "default" <.> format
98 in E.try $ readDataFile user fname
101 in E.try $ readDataFile user fname
99
102
src/pandoc.hs+2−2
@@ -236,7 +236,7 @@ options =
236 (NoArg
236 (NoArg
237 (\opt -> do
237 (\opt -> do
238 err 59 $ "The --strict option has been removed.\n" ++
238 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."
240 return opt ))
240 return opt ))
241 "" -- "Disable markdown syntax extensions"
241 "" -- "Disable markdown syntax extensions"
242
242
@@ -782,7 +782,7 @@ main = do
782 ["Try " ++ prg ++ " --help for more information."]
782 ["Try " ++ prg ++ " --help for more information."]
783
783
784 let defaultOpts' = if compatMode
784 let defaultOpts' = if compatMode
785− then defaultOpts { optReader = "strict"
785+ then defaultOpts { optReader = "markdown_strict"
786 , optWriter = "html"
786 , optWriter = "html"
787 , optEmailObfuscation =
787 , optEmailObfuscation =
788 ReferenceObfuscation }
788 ReferenceObfuscation }