git.iko.soy/typeable/pandoc
on master help sign in
Fixed regression in OPML writer.

OPML writer should note include `_notes` attribute when there's no content.

commit0e4f95998140c70b8eb77f636f81f10de0db4788 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 27 Nov 2016, 15:41 (10 years ago) parentfb2ae14
1 file changed+1−1
src/Text/Pandoc/Writers/OPML.hs+1−1
src/Text/Pandoc/Writers/OPML.hs+1−1
@@ -97,6 +97,6 @@ elementToOPML opts (Sec _ _num _ title elements) = do
9797 then return []
9898 else do blks <- mapM fromBlk blocks
9999 writeMarkdown def $ Pandoc nullMeta blks
100− let attrs = [("text", htmlIls)] ++ [("_note", md)]
100+ let attrs = [("text", htmlIls)] ++ [("_note", md) | not (null blocks)]
101101 o <- mapM (elementToOPML opts) rest
102102 return $ inTags True "outline" attrs $ vcat o