commonmark_x: replace auto_identifiers with gfm_auto_identifiers.

`commonmark_x` never actually supported `auto_identifiers` (it
didn't do anything), because the underlying library implements
gfm-style identifiers only.

Attempts to add the `autolink_identifiers` extension to
`commonmark` will now fail with an error.

Closes #6863.
This commit is contained in:
John MacFarlane 2020-11-20 09:17:14 -08:00
parent d286242131
commit c647948ff1
2 changed files with 6 additions and 5 deletions

View file

@ -355,7 +355,7 @@ getDefaultExtensions "commonmark" = extensionsFromList
getDefaultExtensions "commonmark_x" = extensionsFromList
[ Ext_pipe_tables
, Ext_raw_html
, Ext_auto_identifiers
, Ext_gfm_auto_identifiers
, Ext_strikeout
, Ext_task_lists
, Ext_emoji
@ -474,9 +474,10 @@ getAllExtensions f = universalExtensions <> getAll f
getAll "plain" = allMarkdownExtensions
getAll "gfm" = getAll "commonmark"
getAll "commonmark" =
autoIdExtensions <>
extensionsFromList
[ Ext_pipe_tables
[ Ext_gfm_auto_identifiers
, Ext_ascii_identifiers
, Ext_pipe_tables
, Ext_autolink_bare_uris
, Ext_strikeout
, Ext_task_lists

View file

@ -2,7 +2,7 @@ Check that the commonmark reader handles the `ascii_identifiers`
extension properly.
```
% pandoc -f commonmark+auto_identifiers+gfm_auto_identifiers+ascii_identifiers -t native
% pandoc -f commonmark+gfm_auto_identifiers+ascii_identifiers -t native
# non ascii ⚠️ räksmörgås
^D
[Header 1 ("non-ascii--raksmorgas",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]]
@ -13,7 +13,7 @@ formed from \9888 and \65039. The latter is a combining mark,
so it survives...
```
% pandoc -f commonmark+auto_identifiers+gfm_auto_identifiers-ascii_identifiers -t native
% pandoc -f commonmark+gfm_auto_identifiers-ascii_identifiers -t native
# non ascii ⚠️ räksmörgås
^D
[Header 1 ("non-ascii-\65039-r\228ksm\246rg\229s",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]]