Change deprecated Builder.isNull to null.
This commit is contained in:
parent
277ea0df3d
commit
d5a7abd47f
6 changed files with 9 additions and 9 deletions
|
@ -758,7 +758,7 @@ getMediaobject e = do
|
||||||
Nothing -> return mempty
|
Nothing -> return mempty
|
||||||
Just z -> mconcat <$>
|
Just z -> mconcat <$>
|
||||||
mapM parseInline (elContent z)
|
mapM parseInline (elContent z)
|
||||||
let (capt, title) = if isNull figTitle
|
let (capt, title) = if null figTitle
|
||||||
then (getCaption e, "")
|
then (getCaption e, "")
|
||||||
else (return figTitle, "fig:")
|
else (return figTitle, "fig:")
|
||||||
fmap (imageWith attr imageUrl title) capt
|
fmap (imageWith attr imageUrl title) capt
|
||||||
|
|
|
@ -576,7 +576,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
|
||||||
then do modify $ \s -> s { docxDropCap = ils' }
|
then do modify $ \s -> s { docxDropCap = ils' }
|
||||||
return mempty
|
return mempty
|
||||||
else do modify $ \s -> s { docxDropCap = 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'
|
else prevParaIls <> space) <> ils'
|
||||||
handleInsertion = do
|
handleInsertion = do
|
||||||
modify $ \s -> s {docxPrevPara = mempty}
|
modify $ \s -> s {docxPrevPara = mempty}
|
||||||
|
@ -584,7 +584,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
|
||||||
return $ transform $ paraOrPlain ils''
|
return $ transform $ paraOrPlain ils''
|
||||||
opts <- asks docxOptions
|
opts <- asks docxOptions
|
||||||
case (pChange pPr', readerTrackChanges opts) of
|
case (pChange pPr', readerTrackChanges opts) of
|
||||||
_ | isNull ils'', not (isEnabled Ext_empty_paragraphs opts) ->
|
_ | null ils'', not (isEnabled Ext_empty_paragraphs opts) ->
|
||||||
return mempty
|
return mempty
|
||||||
(Just (TrackedChange Insertion _), AcceptChanges) ->
|
(Just (TrackedChange Insertion _), AcceptChanges) ->
|
||||||
handleInsertion
|
handleInsertion
|
||||||
|
|
|
@ -585,7 +585,7 @@ pBlockQuote = do
|
||||||
pPlain :: PandocMonad m => TagParser m Blocks
|
pPlain :: PandocMonad m => TagParser m Blocks
|
||||||
pPlain = do
|
pPlain = do
|
||||||
contents <- setInPlain $ trimInlines . mconcat <$> many1 inline
|
contents <- setInPlain $ trimInlines . mconcat <$> many1 inline
|
||||||
if B.isNull contents
|
if null contents
|
||||||
then return mempty
|
then return mempty
|
||||||
else return $ B.plain contents
|
else return $ B.plain contents
|
||||||
|
|
||||||
|
@ -593,7 +593,7 @@ pPara :: PandocMonad m => TagParser m Blocks
|
||||||
pPara = do
|
pPara = do
|
||||||
contents <- trimInlines <$> pInTags "p" inline
|
contents <- trimInlines <$> pInTags "p" inline
|
||||||
(do guardDisabled Ext_empty_paragraphs
|
(do guardDisabled Ext_empty_paragraphs
|
||||||
guard (B.isNull contents)
|
guard (null contents)
|
||||||
return mempty)
|
return mempty)
|
||||||
<|> return (B.para contents)
|
<|> return (B.para contents)
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ regularSymbol = str . untoken <$> satisfyTok isRegularSymbol
|
||||||
inlineGroup :: PandocMonad m => LP m Inlines
|
inlineGroup :: PandocMonad m => LP m Inlines
|
||||||
inlineGroup = do
|
inlineGroup = do
|
||||||
ils <- grouped inline
|
ils <- grouped inline
|
||||||
if isNull ils
|
if null ils
|
||||||
then return mempty
|
then return mempty
|
||||||
else return $ spanWith nullAttr ils
|
else return $ spanWith nullAttr ils
|
||||||
-- we need the span so we can detitlecase bibtex entries;
|
-- we need the span so we can detitlecase bibtex entries;
|
||||||
|
|
|
@ -222,9 +222,9 @@ pandocTitleBlock = try $ do
|
||||||
author' <- author
|
author' <- author
|
||||||
date' <- date
|
date' <- date
|
||||||
return $
|
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 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
|
$ nullMeta
|
||||||
updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' }
|
updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' }
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,7 @@ defListItem :: PandocMonad m => MWParser m (Inlines, [Blocks])
|
||||||
defListItem = try $ do
|
defListItem = try $ do
|
||||||
terms <- mconcat . intersperse B.linebreak <$> many defListTerm
|
terms <- mconcat . intersperse B.linebreak <$> many defListTerm
|
||||||
-- we allow dd with no dt, or dt with no dd
|
-- we allow dd with no dt, or dt with no dd
|
||||||
defs <- if B.isNull terms
|
defs <- if null terms
|
||||||
then notFollowedBy
|
then notFollowedBy
|
||||||
(try $ skipMany1 (char ':') >> string "<math>") *>
|
(try $ skipMany1 (char ':') >> string "<math>") *>
|
||||||
many1 (listItem ':')
|
many1 (listItem ':')
|
||||||
|
|
Loading…
Add table
Reference in a new issue