MediaWiki writer: don't softbreak lines inside list items.
Closes #3531.
This commit is contained in:
parent
51ab1bf270
commit
358dfba8f4
2 changed files with 23 additions and 1 deletions
|
@ -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 " "
|
||||
|
||||
|
|
19
test/command/3531.md
Normal file
19
test/command/3531.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
```
|
||||
% pandoc -t mediawiki --wrap=preserve
|
||||
* This is a list item.
|
||||
* This is a list item in Markdown. It is
|
||||
continued in the next line.
|
||||
* It has a sub-item.
|
||||
* This is the next list item.
|
||||
|
||||
A paragraph can span multiple lines
|
||||
without being broken into pieces.
|
||||
^D
|
||||
* This is a list item.
|
||||
* This is a list item in Markdown. It is continued in the next line.
|
||||
** It has a sub-item.
|
||||
* This is the next list item.
|
||||
|
||||
A paragraph can span multiple lines
|
||||
without being broken into pieces.
|
||||
```
|
Loading…
Reference in a new issue