summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/MediaWiki.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-26 20:41:09 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-26 20:41:09 +0200
commit358dfba8f4eba45fdfdfad2c117de99df8b45bc4 (patch)
tree2fb933fd39485bbd410f912932bbce4146b8454a /src/Text/Pandoc/Writers/MediaWiki.hs
parent51ab1bf2700f23e881aa06c638da4d3606fa22a4 (diff)
MediaWiki writer: don't softbreak lines inside list items.
Closes #3531.
Diffstat (limited to 'src/Text/Pandoc/Writers/MediaWiki.hs')
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
index 594e31e95..def245e38 100644
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -409,10 +409,13 @@ inlineToMediaWiki LineBreak = return "<br />\n"
inlineToMediaWiki SoftBreak = do
wrapText <- gets (writerWrapText . stOptions)
+ listlevel <- asks listLevel
case wrapText of
WrapAuto -> return " "
WrapNone -> return " "
- WrapPreserve -> return "\n"
+ WrapPreserve -> if null listlevel
+ then return "\n"
+ else return " "
inlineToMediaWiki Space = return " "