diff options
author | mb21 <mb21@users.noreply.github.com> | 2018-12-10 17:06:00 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-12-10 13:27:45 -0500 |
commit | 532c6a81e12ad62122450523b3fcf9c46ecf1822 (patch) | |
tree | 16d368237e12ee5555b47cb344d21519187fca1b /src/Text | |
parent | 9dd4b30378551b835b24a6bb7401422b2f42c53e (diff) | |
download | pandoc-532c6a81e12ad62122450523b3fcf9c46ecf1822.tar.gz |
ICML writer: support unnumbered headers
closes #5140
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/ICML.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs index f463c75c5..8eb68aa0c 100644 --- a/src/Text/Pandoc/Writers/ICML.hs +++ b/src/Text/Pandoc/Writers/ICML.hs @@ -315,8 +315,11 @@ blockToICML opts style (BlockQuote blocks) = blocksToICML opts (blockQuoteName:s blockToICML opts style (OrderedList attribs lst) = listItemsToICML opts orderedListName style (Just attribs) lst blockToICML opts style (BulletList lst) = listItemsToICML opts bulletListName style Nothing lst blockToICML opts style (DefinitionList lst) = intersperseBrs `fmap` mapM (definitionListItemToICML opts style) lst -blockToICML opts style (Header lvl _ lst) = - let stl = (headerName ++ show lvl):style +blockToICML opts style (Header lvl (_, cls, _) lst) = + let stl = (headerName ++ show lvl ++ unnumbered):style + unnumbered = if "unnumbered" `elem` cls + then " (unnumbered)" + else "" in parStyle opts stl lst blockToICML _ _ HorizontalRule = return empty -- we could insert a page break instead blockToICML opts style (Table caption aligns widths headers rows) = |