From 0e4f95998140c70b8eb77f636f81f10de0db4788 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 27 Nov 2016 15:41:55 +0100 Subject: Fixed regression in OPML writer. OPML writer should note include `_notes` attribute when there's no content. --- src/Text/Pandoc/Writers/OPML.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/OPML.hs b/src/Text/Pandoc/Writers/OPML.hs index 4f832f962..dee3a029c 100644 --- a/src/Text/Pandoc/Writers/OPML.hs +++ b/src/Text/Pandoc/Writers/OPML.hs @@ -97,6 +97,6 @@ elementToOPML opts (Sec _ _num _ title elements) = do then return [] else do blks <- mapM fromBlk blocks writeMarkdown def $ Pandoc nullMeta blks - let attrs = [("text", htmlIls)] ++ [("_note", md)] + let attrs = [("text", htmlIls)] ++ [("_note", md) | not (null blocks)] o <- mapM (elementToOPML opts) rest return $ inTags True "outline" attrs $ vcat o -- cgit v1.2.3