git.iko.soy/typeable/pandoc
on master help sign in
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`.

commitafe6533c1951cd43c3b5d4b180c95ecdd456c3ee authorJohn MacFarlane <jgm@berkeley.edu> dateTue 5 May 2020, 15:35 (6 years ago) parenta4366fe
1 file changed+11−9
src/Text/Pandoc/Extensions.hs+11−9
src/Text/Pandoc/Extensions.hs+11−9
@@ -243,21 +243,14 @@ phpMarkdownExtraExtensions = extensionsFromList
243243-- | Extensions to be used with github-flavored markdown.
244244githubMarkdownExtensions :: Extensions
245245githubMarkdownExtensions = extensionsFromList
246− [ Ext_all_symbols_escapable
247− , Ext_pipe_tables
246+ [ Ext_pipe_tables
248247 , Ext_raw_html
249− , Ext_fenced_code_blocks
250248 , Ext_auto_identifiers
251249 , Ext_gfm_auto_identifiers
252− , Ext_backtick_code_blocks
253250 , Ext_autolink_bare_uris
254− , Ext_space_in_atx_header
255− , Ext_intraword_underscores
256251 , Ext_strikeout
257252 , Ext_task_lists
258253 , Ext_emoji
259− , Ext_lists_without_preceding_blankline
260− , Ext_shortcut_reference_links
261254 ]
262255
263256-- | Extensions to be used with multimarkdown.
@@ -309,7 +302,16 @@ getDefaultExtensions :: T.Text -> Extensions
309302getDefaultExtensions "markdown_strict" = strictExtensions
310303getDefaultExtensions "markdown_phpextra" = phpMarkdownExtraExtensions
311304getDefaultExtensions "markdown_mmd" = multimarkdownExtensions
312−getDefaultExtensions "markdown_github" = githubMarkdownExtensions
305+getDefaultExtensions "markdown_github" = githubMarkdownExtensions <>
306+ extensionsFromList
307+ [ Ext_all_symbols_escapable
308+ , Ext_backtick_code_blocks
309+ , Ext_fenced_code_blocks
310+ , Ext_space_in_atx_header
311+ , Ext_intraword_underscores
312+ , Ext_lists_without_preceding_blankline
313+ , Ext_shortcut_reference_links
314+ ]
313315getDefaultExtensions "markdown" = pandocExtensions
314316getDefaultExtensions "ipynb" =
315317 extensionsFromList