@@ -333,7 +333,8 @@ blockListToRST = blockListToRST' False
333333-- | Convert list of Pandoc inline elements to RST.
334334inlineListToRST :: [Inline] -> State WriterState Doc
335335inlineListToRST lst =
336− mapM inlineToRST (removeSpaceAfterDisplayMath $ insertBS lst) >>= return . hcat
336+ mapM inlineToRST (removeSpaceAfterDisplayMath $ insertBS lst) >>=
337+ return . hcat
337338 where -- remove spaces after displaymath, as they screw up indentation:
338339 removeSpaceAfterDisplayMath (Math DisplayMath x : zs) =
339340 Math DisplayMath x : dropWhile (==Space) zs
@@ -341,8 +342,8 @@ inlineListToRST lst =
341342 removeSpaceAfterDisplayMath [] = []
342343 insertBS :: [Inline] -> [Inline] -- insert '\ ' where needed
343344 insertBS (x:y:z:zs)
344− | isComplex y && surroundComplex x z =
345− x : y : RawInline "rst" "\\ " : insertBS (z:zs)
345+ | isComplex y && (surroundComplex x z) =
346+ x : y : insertBS (z : zs)
346347 insertBS (x:y:zs)
347348 | isComplex x && not (okAfterComplex y) =
348349 x : RawInline "rst" "\\ " : insertBS (y : zs)