Commonmark writer: use shortcut reference links.

Commonmark supports these.
This commit is contained in:
John MacFarlane
2023-04-28 22:03:01 -07:00
parent 16be353077
commit a34a4d8e4a
+2 -1
View File
@@ -657,7 +657,8 @@ inlineToMarkdown opts lnk@(Link attr@(ident,classes,kvs) txt (src, tit)) = do
let useRefLinks = writerReferenceLinks opts && not useAuto
shortcutable <- asks envRefShortcutable
let useShortcutRefLinks = shortcutable &&
isEnabled Ext_shortcut_reference_links opts
(variant == Commonmark ||
isEnabled Ext_shortcut_reference_links opts)
reftext <- if useRefLinks
then literal <$> getReference attr linktext (src, tit)
else return mempty