More throwError in place of fail.

This commit is contained in:
John MacFarlane 2019-09-28 14:45:38 -07:00
parent 63a1e05dd1
commit 03d4e6b9ef
2 changed files with 3 additions and 1 deletions

View file

@ -95,6 +95,7 @@ instance Semigroup EnvProps where
instance Monoid EnvProps where
mempty = EnvProps Nothing []
mappend = (<>)
squashProps :: EnvProps -> [Element]
squashProps (EnvProps Nothing es) = es

View file

@ -629,7 +629,8 @@ inlineToMuse (Code _ str) = do
then "<code>" <> text (substitute "</code>" "<</code><code>/code>" str) <> "</code>"
else "=" <> text str <> "="
inlineToMuse Math{} =
Prelude.fail "Math should be expanded before normalization"
throwError $ PandocShouldNeverHappenError
"Math should be expanded before normalization"
inlineToMuse (RawInline (Format f) str) = do
modify $ \st -> st { stUseTags = False }
return $ "<literal style=\"" <> text f <> "\">" <> text str <> "</literal>"