mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 13:51:29 +08:00
Muse writer: fix math expansion for more than one expression per paragraph
This commit is contained in:
@@ -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 []
|
||||
|
||||
|
||||
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user