aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2020-05-05 15:35:44 -0700
committerJohn MacFarlane <[email protected]>2020-05-14 09:00:35 -0700
commitafe6533c1951cd43c3b5d4b180c95ecdd456c3ee (patch)
treed1c0332cbb5a4629d70e31c5a29c88457d96ae39
parenta4366feccb9dbe63f4512c41fa98a23a2b9c16bb (diff)
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`.
-rw-r--r--src/Text/Pandoc/Extensions.hs20
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