Skip to content

Commit

Permalink
Commonmark writer: use shortcut reference links.
Browse files Browse the repository at this point in the history
Commonmark supports these.
  • Loading branch information
jgm committed Apr 29, 2023
1 parent 16be353 commit a34a4d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Text/Pandoc/Writers/Markdown/Inline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a34a4d8

Please sign in to comment.