@@ -26,6 +26,7 @@ even though it is supported only in Emacs Muse.
2626-}
2727module Text.Pandoc.Writers.Muse (writeMuse) where
2828import Prelude
29+import Control.Monad.Except (throwError)
2930import Control.Monad.Reader
3031import Control.Monad.State.Strict
3132import Data.Char (isAlphaNum, isAsciiLower, isAsciiUpper, isDigit, isSpace)
@@ -37,6 +38,7 @@ import Data.Text (Text)
3738import System.FilePath (takeExtension)
3839import Text.Pandoc.Class (PandocMonad)
3940import Text.Pandoc.Definition
41+import Text.Pandoc.Error
4042import Text.Pandoc.ImageSize
4143import Text.Pandoc.Options
4244import Text.DocLayout
@@ -607,7 +609,8 @@ inlineToMuse (Subscript lst) = do
607609 modify $ \st -> st { stUseTags = False }
608610 return $ "<sub>" <> contents <> "</sub>"
609611inlineToMuse SmallCaps {} =
610− Prelude.fail "SmallCaps should be expanded before normalization"
612+ throwError $ PandocShouldNeverHappenError
613+ "SmallCaps should be expanded before normalization"
611614inlineToMuse (Quoted SingleQuote lst) = do
612615 contents <- inlineListToMuse lst
613616 modify $ \st -> st { stUseTags = False }