@@ -554,8 +554,11 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
554554 unless (null msg) $
555555 report $ CouldNotHighlight msg
556556 rawCodeBlock
557− Right h -> modify (\st -> st{ stHighlighting = True }) >>
558− return (flush $ linkAnchor $$ text (T.unpack h))
557+ Right h -> do
558+ st <- get
559+ when (stInNote st) $ modify (\s -> s{ stVerbInNote = True })
560+ modify (\s -> s{ stHighlighting = True })
561+ return (flush $ linkAnchor $$ text (T.unpack h))
559562 case () of
560563 _ | isEnabled Ext_literate_haskell opts && "haskell" `elem` classes &&
561564 "literate" `elem` classes -> lhsCodeBlock