Shared: export isTightList.
This commit is contained in:
parent
8c48bd8feb
commit
7909982f9a
1 changed files with 7 additions and 0 deletions
|
@ -60,6 +60,7 @@ module Text.Pandoc.Shared (
|
|||
uniqueIdent,
|
||||
isHeaderBlock,
|
||||
headerShift,
|
||||
isTightList,
|
||||
-- * TagSoup HTML handling
|
||||
renderTags',
|
||||
-- * File handling
|
||||
|
@ -475,6 +476,12 @@ headerShift n = bottomUp shift
|
|||
shift (Header level inner) = Header (level + n) inner
|
||||
shift x = x
|
||||
|
||||
-- | Detect if a list is tight.
|
||||
isTightList :: [[Block]] -> Bool
|
||||
isTightList = and . map firstIsPlain
|
||||
where firstIsPlain (Plain _ : _) = True
|
||||
firstIsPlain _ = False
|
||||
|
||||
--
|
||||
-- TagSoup HTML handling
|
||||
--
|
||||
|
|
Loading…
Add table
Reference in a new issue