@@ -644,11 +644,14 @@ blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do
644644 hlCode = if isJust (writerHighlightStyle opts)
645645 then highlight formatHtmlBlock
646646 (id',classes',keyvals) adjCode
647− else Nothing
647+ else Left ""
648648 case hlCode of
649− Nothing -> return $ addAttrs opts (id',classes,keyvals)
649+ Left msg -> do
650+ unless (null msg) $
651+ report $ CouldNotHighlight msg
652+ return $ addAttrs opts (id',classes,keyvals)
650653 $ H.pre $ H.code $ toHtml adjCode
651− Just h -> modify (\st -> st{ stHighlighting = True }) >>
654+ Right h -> modify (\st -> st{ stHighlighting = True }) >>
652655 return (addAttrs opts (id',[],keyvals) h)
653656blockToHtml opts (BlockQuote blocks) = do
654657 -- in S5, treat list in blockquote specially
@@ -872,17 +875,19 @@ inlineToHtml opts inline = do
872875 (Emph lst) -> inlineListToHtml opts lst >>= return . H.em
873876 (Strong lst) -> inlineListToHtml opts lst >>= return . H.strong
874877 (Code attr str) -> case hlCode of
875− Nothing -> return
876− $ addAttrs opts attr
877− $ H.code $ strToHtml str
878− Just h -> do
878+ Left msg -> do
879+ unless (null msg) $
880+ report $ CouldNotHighlight msg
881+ return $ addAttrs opts attr
882+ $ H.code $ strToHtml str
883+ Right h -> do
879884 modify $ \st -> st{ stHighlighting = True }
880885 return $ addAttrs opts (id',[],keyvals) h
881886 where (id',_,keyvals) = attr
882887 hlCode = if isJust (writerHighlightStyle opts)
883888 then highlight formatHtmlInline
884889 attr str
885− else Nothing
890+ else Left ""
886891 (Strikeout lst) -> inlineListToHtml opts lst >>=
887892 return . H.del
888893 (SmallCaps lst) -> inlineListToHtml opts lst >>=