From 0d2e5eab79edee0ccc711772a2def5b8082797b4 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 12 Mar 2007 00:36:41 +0000 Subject: Added clauses for DefinitionList and Table to replaceReferenceLinks in Text/Pandoc/Shared.hs. This ensures that reference-style links inside tables and definition lists will be handled properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@575 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Shared.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index e5d6e77df..61b621eda 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -497,6 +497,14 @@ replaceRefLinksBlock keytable (OrderedList lst) = OrderedList (map (replaceRefLinksBlockList keytable) lst) replaceRefLinksBlock keytable (BulletList lst) = BulletList (map (replaceRefLinksBlockList keytable) lst) +replaceRefLinksBlock keytable (DefinitionList lst) = + DefinitionList (map (\(term, def) -> + (map (replaceRefLinksInline keytable) term, + replaceRefLinksBlockList keytable def)) lst) +replaceRefLinksBlock keytable (Table caption alignment widths headers rows) = + Table (map (replaceRefLinksInline keytable) caption) alignment widths + (map (replaceRefLinksBlockList keytable) headers) + (map (map (replaceRefLinksBlockList keytable)) rows) replaceRefLinksBlock keytable other = other -- | Use key table to replace reference links with explicit links in an -- cgit v1.2.3