@@ -626,7 +626,7 @@ directive' = do
626 return $ B.divWith attrs children
626 return $ B.divWith attrs children
627 other -> do
627 other -> do
628 pos <- getPosition
628 pos <- getPosition
629− P.addWarningWithPos (Just pos) $ "ignoring unknown directive: " ++ other
629+ P.warningWithPos (Just pos) $ "ignoring unknown directive: " ++ other
630 return mempty
630 return mempty
@@ -654,20 +654,20 @@ addNewRole roleString fields = do
655 -- warn about syntax we ignore
655 -- warn about syntax we ignore
656 flip mapM_ fields $ \(key, _) -> case key of
656 flip mapM_ fields $ \(key, _) -> case key of
657− "language" -> when (baseRole /= "code") $ lift $ P.addWarning $
657+ "language" -> when (baseRole /= "code") $ lift $ P.warning $
658 "ignoring :language: field because the parent of role :" ++
658 "ignoring :language: field because the parent of role :" ++
659 role ++ ": is :" ++ baseRole ++ ": not :code:"
659 role ++ ": is :" ++ baseRole ++ ": not :code:"
660− "format" -> when (baseRole /= "raw") $ lift $ P.addWarning $
660+ "format" -> when (baseRole /= "raw") $ lift $ P.warning $
661 "ignoring :format: field because the parent of role :" ++
661 "ignoring :format: field because the parent of role :" ++
662 role ++ ": is :" ++ baseRole ++ ": not :raw:"
662 role ++ ": is :" ++ baseRole ++ ": not :raw:"
663− _ -> lift $ P.addWarning $ "ignoring unknown field :" ++ key ++
663+ _ -> lift $ P.warning $ "ignoring unknown field :" ++ key ++
664 ": in definition of role :" ++ role ++ ": in"
664 ": in definition of role :" ++ role ++ ": in"
665 when (parentRole == "raw" && countKeys "format" > 1) $
665 when (parentRole == "raw" && countKeys "format" > 1) $
666− lift $ P.addWarning $
666+ lift $ P.warning $
667 "ignoring :format: fields after the first in the definition of role :"
667 "ignoring :format: fields after the first in the definition of role :"
668 ++ role ++": in"
668 ++ role ++": in"
669 when (parentRole == "code" && countKeys "language" > 1) $
669 when (parentRole == "code" && countKeys "language" > 1) $
670− lift $ P.addWarning $
670+ lift $ P.warning $
671 "ignoring :language: fields after the first in the definition of role :"
671 "ignoring :language: fields after the first in the definition of role :"
672 ++ role ++": in"
672 ++ role ++": in"
@@ -1065,7 +1065,7 @@ renderRole contents fmt role attr = case role of
1065 renderRole contents newFmt newRole newAttr
1065 renderRole contents newFmt newRole newAttr
1066 Nothing -> do
1066 Nothing -> do
1067 pos <- getPosition
1067 pos <- getPosition
1068− P.addWarningWithPos (Just pos) $ "ignoring unknown role :" ++ custom ++ ": in"
1068+ P.warningWithPos (Just pos) $ "ignoring unknown role :" ++ custom ++ ": in"
1069 return $ B.str contents -- Undefined role
1069 return $ B.str contents -- Undefined role
1071 titleRef ref = return $ B.str ref -- FIXME: Not a sensible behaviour
1071 titleRef ref = return $ B.str ref -- FIXME: Not a sensible behaviour