diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index dda21d23d..3fd297c00 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -479,7 +479,11 @@ inlineToDokuWiki _ il@(RawInline f str) | f == Format "html" = return $ "" ++ str ++ "" | otherwise = "" <$ report (InlineNotRendered il) -inlineToDokuWiki _ LineBreak = return "\\\\\n" +inlineToDokuWiki _ LineBreak = do + backSlash <- stBackSlashLB <$> ask + return $ if backSlash + then "\n" + else "\\\\\n" inlineToDokuWiki opts SoftBreak = case writerWrapText opts of diff --git a/test/dokuwiki_multiblock_table.dokuwiki b/test/dokuwiki_multiblock_table.dokuwiki index 8b913f1f2..393ebeba0 100644 --- a/test/dokuwiki_multiblock_table.dokuwiki +++ b/test/dokuwiki_multiblock_table.dokuwiki @@ -1,4 +1,5 @@ Sample grid table. -^Fruit ^Price^Advantages ^ -|Bananas|$1.34|built-in wrapper\\ \\ potassium| -|Oranges|$2.10|* cures scurvy\\ * tasty | +^Fruit ^Price^Advantages ^ +|Bananas|$1.34|built-in wrapper\\ \\ potassium | +|Oranges|$2.10|* cures scurvy\\ * tasty | +|Apples |$1.10|Some text\\ \\ after two linebreaks| diff --git a/test/dokuwiki_multiblock_table.native b/test/dokuwiki_multiblock_table.native index 34824296d..6059efb71 100644 --- a/test/dokuwiki_multiblock_table.native +++ b/test/dokuwiki_multiblock_table.native @@ -10,4 +10,9 @@ ,[Para [Str "$2.10"]] ,[BulletList [[Plain [Str "cures",Space,Str "scurvy"]] - ,[Plain [Str "tasty"]]]]]]] + ,[Plain [Str "tasty"]]]]] + ,[[Para [Str "Apples"]] + ,[Para [Str "$1.10"]] + ,[Para [Str "Some",Space,Str "text",LineBreak,LineBreak,Str "after",Space,Str "two",Space,Str "linebreaks"] + ]] + ]]