From a36d202e862f3fe0652e4f46cf7713120f50be28 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 11 Nov 2018 13:27:25 -0800 Subject: Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier. The parameter is Extensions. This allows these functions to be sensitive to the settings of `Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`. This allows us to use `uniqueIdent` in the CommonMark reader, replacing some custom code. It also means that `gfm_auto_identifiers` can now be used in all formats. Semantically, `gfm_auto_identifiers` is now a modifier of `auto_identifiers`; for identifiers to be set, `auto_identifiers` must be turned on, and then the type of identifier produced depends on `gfm_auto_identifiers` and `ascii_identifiers` are set. Closes #5057. --- test/command/4742.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/command') diff --git a/test/command/4742.md b/test/command/4742.md index 72751d727..f97314b10 100644 --- a/test/command/4742.md +++ b/test/command/4742.md @@ -2,24 +2,24 @@ Check that the commonmark reader handles the `ascii_identifiers` extension properly. ``` -% pandoc -f commonmark+gfm_auto_identifiers+ascii_identifiers -t native +% pandoc -f commonmark+auto_identifiers+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"]] ``` ``` -% pandoc -f commonmark+gfm_auto_identifiers-ascii_identifiers -t native +% pandoc -f commonmark+auto_identifiers+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"]] ``` -`gfm` should have `ascii_identifiers` enabled by default. +`gfm` should have `ascii_identifiers` disabled by default. ``` % pandoc -f gfm -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"]] +[Header 1 ("non-ascii-\65039-r\228ksm\246rg\229s",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]] ``` -- cgit v1.2.3