Muse writer: fix math expansion for more than one expression per paragraph

This commit is contained in:
Alexander Krotov
2018-03-06 12:58:20 +03:00
parent 7d193b2aad
commit 31b4387a6b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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 []
+1
View File
@@ -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>"