summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-03 18:42:17 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:40 +0100
commita4bd650277ac8fd2c952f2330e4d23a200d691a5 (patch)
tree9d6d202862b4f460669223dc0abd0e21b11ec7b4 /src/Text/Pandoc/Readers/Markdown.hs
parent63dc6bd02509eb31d9d221c4e39f18af2b77fe6d (diff)
Class: rename addWarning[WithPos] to warning[WithPos].
There's already a function addWarning in Parsing! Maybe we can dispense with that now, but I still like 'warning' better as a name.
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index b59e5a5f1..012edfe3b 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -280,7 +280,7 @@ yamlMetaBlock = try $ do
) nullMeta hashmap
Right Yaml.Null -> return nullMeta
Right _ -> do
- P.addWarningWithPos (Just pos) "YAML header is not an object"
+ P.warningWithPos (Just pos) "YAML header is not an object"
return nullMeta
Left err' -> do
case err' of
@@ -291,13 +291,13 @@ yamlMetaBlock = try $ do
yamlLine = yline
, yamlColumn = ycol
}}) ->
- P.addWarningWithPos (Just $ setSourceLine
+ P.warningWithPos (Just $ setSourceLine
(setSourceColumn pos
(sourceColumn pos + ycol))
(sourceLine pos + 1 + yline))
$ "Could not parse YAML header: " ++
problem
- _ -> P.addWarningWithPos (Just pos)
+ _ -> P.warningWithPos (Just pos)
$ "Could not parse YAML header: " ++
show err'
return nullMeta
@@ -420,7 +420,7 @@ referenceKey = try $ do
let oldkeys = stateKeys st
let key = toKey raw
case M.lookup key oldkeys of
- Just _ -> P.addWarningWithPos (Just pos) $ "Duplicate link reference `" ++ raw ++ "'"
+ Just _ -> P.warningWithPos (Just pos) $ "Duplicate link reference `" ++ raw ++ "'"
Nothing -> return ()
updateState $ \s -> s { stateKeys = M.insert key (target, attr') oldkeys }
return $ return mempty
@@ -486,7 +486,7 @@ noteBlock = try $ do
let newnote = (ref, parsed)
oldnotes <- stateNotes' <$> getState
case lookup ref oldnotes of
- Just _ -> P.addWarningWithPos (Just pos) $ "Duplicate note reference `" ++ ref ++ "'"
+ Just _ -> P.warningWithPos (Just pos) $ "Duplicate note reference `" ++ ref ++ "'"
Nothing -> return ()
updateState $ \s -> s { stateNotes' = newnote : oldnotes }
return mempty