diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-04-26 21:07:17 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-07-19 22:51:59 -0700 |
commit | 3a22fbd11bba805140b1963a583a11b4fa1169a2 (patch) | |
tree | f9dc3446397e2df8cc9dd13771aaa889149cbd69 /src | |
parent | 8d523d80d4120413f6b62bf833d6da8f2a69b925 (diff) | |
download | pandoc-3a22fbd11bba805140b1963a583a11b4fa1169a2.tar.gz |
Trim down githubMarkdownExtensions.
Previously it included all of the following, which make
sense for the legacy markdown_github but not for gfm,
since they are part of base commonmark and thus
can't be turned off in gfm:
- `Ext_all_symbols_escapable`
- `Ext_backtick_code_blocks`
- `Ext_fenced_code_blocks`
- `Ext_space_in_atx_header`
- `Ext_intraword_underscores`
- `Ext_lists_without_preceding_blankline`
- `Ext_shortcut_reference_links`
`
These have been removed from `githubMarkdownExtensions`, though
they're still turned on for legacy `markdown_github`.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Extensions.hs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs index be8aa1948..2b7cfca7e 100644 --- a/src/Text/Pandoc/Extensions.hs +++ b/src/Text/Pandoc/Extensions.hs @@ -243,21 +243,14 @@ phpMarkdownExtraExtensions = extensionsFromList -- | Extensions to be used with github-flavored markdown. githubMarkdownExtensions :: Extensions githubMarkdownExtensions = extensionsFromList - [ Ext_all_symbols_escapable - , Ext_pipe_tables + [ Ext_pipe_tables , Ext_raw_html - , Ext_fenced_code_blocks , Ext_auto_identifiers , Ext_gfm_auto_identifiers - , Ext_backtick_code_blocks , Ext_autolink_bare_uris - , Ext_space_in_atx_header - , Ext_intraword_underscores , Ext_strikeout , Ext_task_lists , Ext_emoji - , Ext_lists_without_preceding_blankline - , Ext_shortcut_reference_links ] -- | Extensions to be used with multimarkdown. @@ -309,7 +302,16 @@ getDefaultExtensions :: T.Text -> Extensions getDefaultExtensions "markdown_strict" = strictExtensions getDefaultExtensions "markdown_phpextra" = phpMarkdownExtraExtensions getDefaultExtensions "markdown_mmd" = multimarkdownExtensions -getDefaultExtensions "markdown_github" = githubMarkdownExtensions +getDefaultExtensions "markdown_github" = githubMarkdownExtensions <> + extensionsFromList + [ Ext_all_symbols_escapable + , Ext_backtick_code_blocks + , Ext_fenced_code_blocks + , Ext_space_in_atx_header + , Ext_intraword_underscores + , Ext_lists_without_preceding_blankline + , Ext_shortcut_reference_links + ] getDefaultExtensions "markdown" = pandocExtensions getDefaultExtensions "ipynb" = extensionsFromList |