Change deprecated Builder.isNull to null.

This commit is contained in:
John MacFarlane 2020-09-19 15:58:28 -07:00
parent 277ea0df3d
commit d5a7abd47f
6 changed files with 9 additions and 9 deletions

View file

@ -758,7 +758,7 @@ getMediaobject e = do
Nothing -> return mempty
Just z -> mconcat <$>
mapM parseInline (elContent z)
let (capt, title) = if isNull figTitle
let (capt, title) = if null figTitle
then (getCaption e, "")
else (return figTitle, "fig:")
fmap (imageWith attr imageUrl title) capt

View file

@ -576,7 +576,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
then do modify $ \s -> s { docxDropCap = ils' }
return mempty
else do modify $ \s -> s { docxDropCap = mempty }
let ils'' = (if isNull prevParaIls then mempty
let ils'' = (if null prevParaIls then mempty
else prevParaIls <> space) <> ils'
handleInsertion = do
modify $ \s -> s {docxPrevPara = mempty}
@ -584,7 +584,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
return $ transform $ paraOrPlain ils''
opts <- asks docxOptions
case (pChange pPr', readerTrackChanges opts) of
_ | isNull ils'', not (isEnabled Ext_empty_paragraphs opts) ->
_ | null ils'', not (isEnabled Ext_empty_paragraphs opts) ->
return mempty
(Just (TrackedChange Insertion _), AcceptChanges) ->
handleInsertion

View file

@ -585,7 +585,7 @@ pBlockQuote = do
pPlain :: PandocMonad m => TagParser m Blocks
pPlain = do
contents <- setInPlain $ trimInlines . mconcat <$> many1 inline
if B.isNull contents
if null contents
then return mempty
else return $ B.plain contents
@ -593,7 +593,7 @@ pPara :: PandocMonad m => TagParser m Blocks
pPara = do
contents <- trimInlines <$> pInTags "p" inline
(do guardDisabled Ext_empty_paragraphs
guard (B.isNull contents)
guard (null contents)
return mempty)
<|> return (B.para contents)

View file

@ -200,7 +200,7 @@ regularSymbol = str . untoken <$> satisfyTok isRegularSymbol
inlineGroup :: PandocMonad m => LP m Inlines
inlineGroup = do
ils <- grouped inline
if isNull ils
if null ils
then return mempty
else return $ spanWith nullAttr ils
-- we need the span so we can detitlecase bibtex entries;

View file

@ -222,9 +222,9 @@ pandocTitleBlock = try $ do
author' <- author
date' <- date
return $
(if B.isNull title' then id else B.setMeta "title" title')
(if null title' then id else B.setMeta "title" title')
. (if null author' then id else B.setMeta "author" author')
. (if B.isNull date' then id else B.setMeta "date" date')
. (if null date' then id else B.setMeta "date" date')
$ nullMeta
updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' }

View file

@ -434,7 +434,7 @@ defListItem :: PandocMonad m => MWParser m (Inlines, [Blocks])
defListItem = try $ do
terms <- mconcat . intersperse B.linebreak <$> many defListTerm
-- we allow dd with no dt, or dt with no dd
defs <- if B.isNull terms
defs <- if null terms
then notFollowedBy
(try $ skipMany1 (char ':') >> string "<math>") *>
many1 (listItem ':')