From b9f77ed03d0e4a0651d7508d563e880556690fcf Mon Sep 17 00:00:00 2001 From: Konstantin Zudov Date: Tue, 3 Mar 2015 03:28:56 +0200 Subject: Support shortcut reference links in markdown writer Issue #1977 Most markdown processors support the [shortcut format] for reference links. Pandoc's markdown reader parsed this shortcuts unoptionally. Pandoc's markdown writer (with --reference-links option) never shortcutted links. This commit adds an extension `shortcut_reference_links`. The extension is enabled by default for those markdown flavors that support reading shortcut reference links, namely: - pandoc - strict pandoc - github flavoured - PHPmarkdown If extension is enabled, reader parses the shortcuts in the same way as it preveously did. Otherwise it would parse them as normal text. If extension is enabled, writer outputs shortcut reference links unless doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`). --- README | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'README') diff --git a/README b/README index 160fc539e..0df8e8d26 100644 --- a/README +++ b/README @@ -2785,6 +2785,11 @@ in several respects: we must either disallow lazy wrapping or require a blank line between list items. +#### Extension: `shortcut_reference_links` #### + +Allows to use shortcut reference links: `[foo]` instead of `[foo][]`. Writer +would shortcut links unless doing so might cause problems. + Markdown variants ----------------- -- cgit v1.2.3