From a63c208d77035c71b193b3a5b7d5339591b0c25a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 20 Mar 2013 09:16:16 -0700 Subject: OPML reader: Type attributes are not case sensitive. So, `type="link"` or `type="LINK"`. --- src/Text/Pandoc/Readers/OPML.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers/OPML.hs') diff --git a/src/Text/Pandoc/Readers/OPML.hs b/src/Text/Pandoc/Readers/OPML.hs index 53b599349..c9726d195 100644 --- a/src/Text/Pandoc/Readers/OPML.hs +++ b/src/Text/Pandoc/Readers/OPML.hs @@ -87,8 +87,8 @@ parseBlock (Elem e) = modify $ \st -> st{ opmlSectionLevel = n } bs <- getBlocks e modify $ \st -> st{ opmlSectionLevel = n - 1 } - let headerText' = case attrValue "type" e of - "link" -> link + let headerText' = case map toUpper (attrValue "type" e) of + "LINK" -> link (attrValue "url" e) "" headerText _ -> headerText return $ header n headerText' <> noteBlocks <> bs -- cgit v1.2.3