aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-11-27 15:41:55 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:39 +0100
commit0e4f95998140c70b8eb77f636f81f10de0db4788 (patch)
tree57306d9d01072df48f3be062518bf1742f130846 /src/Text/Pandoc
parentfb2ae14977fd7b27588c9e3a249571a937eaffdb (diff)
downloadpandoc-0e4f95998140c70b8eb77f636f81f10de0db4788.tar.gz
Fixed regression in OPML writer.
OPML writer should note include `_notes` attribute when there's no content.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/OPML.hs2
1 files changed, 1 insertions, 1 deletions
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