diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-06 12:53:19 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-06 12:58:20 +0300 |
commit | 31b4387a6b53fb543fa6139e6174ad2e2c7bb5e9 (patch) | |
tree | e814956e4dbc80e8bcf9fe71f946794fa5daabee | |
parent | 7d193b2aadfed75b4c85a97f24ba5b36a3961fa9 (diff) | |
download | pandoc-31b4387a6b53fb543fa6139e6174ad2e2c7bb5e9.tar.gz |
Muse writer: fix math expansion for more than one expression per paragraph
-rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 2 | ||||
-rw-r--r-- | test/Tests/Writers/Muse.hs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 1f6006b2e..404ebf7bc 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -295,7 +295,7 @@ conditionalEscapeString s = preprocessInlineList :: PandocMonad m => [Inline] -> m [Inline] -preprocessInlineList (Math t str:xs) = (++ xs) <$> texMathToInlines t str +preprocessInlineList (Math t str:xs) = (++) <$> texMathToInlines t str <*> preprocessInlineList xs preprocessInlineList (x:xs) = (x:) <$> preprocessInlineList xs preprocessInlineList [] = return [] diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index df02236ac..7aec8122a 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -333,6 +333,7 @@ tests = [ testGroup "block elements" , "display math" =: displayMath "2^3" =?> "2<sup>3</sup>" , "multiple letters in inline math" =: math "abc" =?> "<em>abc</em>" , "expand math before normalization" =: math "[" <> str "2]" =?> "<verbatim>[2]</verbatim>" + , "multiple math expressions inside one inline list" =: math "5_4" <> text ", " <> displayMath "3^2" =?> "5<sub>4</sub>, 3<sup>2</sup>" ] , "raw inline" =: rawInline "html" "<mark>marked text</mark>" |