diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-11 10:10:50 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-11 10:11:53 -0800 |
commit | 97a3cb2e8612281f68162d9a86e7e9f3c4d88749 (patch) | |
tree | 0f54aeaf6f0e350ff2ca9c7a5dc48a4894c98702 /src/Text | |
parent | 791763d09ff493eeb58d3b57977a64a96eb3cc58 (diff) | |
download | pandoc-97a3cb2e8612281f68162d9a86e7e9f3c4d88749.tar.gz |
Options: Added githubMarkdownExtensions.
Added github_markdown as input/output option.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Options.hs | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index ce1da05a1..66401c674 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -236,6 +236,7 @@ writers = [ ,("markdown" , PureStringWriter writeMarkdown) ,("markdown_strict" , PureStringWriter writeMarkdown) ,("markdown_phpextra" , PureStringWriter writeMarkdown) + ,("markdown_github" , PureStringWriter writeMarkdown) ,("plain" , PureStringWriter writePlain) ,("rst" , PureStringWriter writeRST) ,("mediawiki" , PureStringWriter writeMediaWiki) @@ -248,6 +249,7 @@ writers = [ getDefaultExtensions :: String -> Set Extension getDefaultExtensions "markdown_strict" = strictExtensions getDefaultExtensions "markdown_phpextra" = phpMarkdownExtraExtensions +getDefaultExtensions "markdown_github" = githubMarkdownExtensions getDefaultExtensions _ = pandocExtensions -- | Retrieve reader based on formatSpec (format+extensions). diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index 2382bb3e8..35d1a2173 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -32,6 +32,7 @@ module Text.Pandoc.Options ( Extension(..) , pandocExtensions , strictExtensions , phpMarkdownExtraExtensions + , githubMarkdownExtensions , ReaderOptions(..) , HTMLMathMethod (..) , CiteMethod (..) @@ -148,6 +149,20 @@ phpMarkdownExtraExtensions = Set.fromList , Ext_abbreviations ] +githubMarkdownExtensions :: Set Extension +githubMarkdownExtensions = Set.fromList + [ Ext_pipe_tables + , Ext_raw_html + , Ext_tex_math_single_backslash + , Ext_fenced_code_blocks + , Ext_fenced_code_attributes + , Ext_backtick_code_blocks + , Ext_autolink_urls + , Ext_intraword_underscores + , Ext_strikeout + , Ext_hard_line_breaks + ] + strictExtensions :: Set Extension strictExtensions = Set.fromList [ Ext_raw_html ] |