diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-08-07 22:49:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-08-07 22:49:15 -0700 |
commit | 6561ce0ec1fd852e2409faf2e4fb7e8809bff991 (patch) | |
tree | d1b4d09f0aca80954981644ea9f12c135c56baa9 /src | |
parent | 7cfec2bcd9b1542e59c21ee80ca391abf5fdbf2a (diff) | |
download | pandoc-6561ce0ec1fd852e2409faf2e4fb7e8809bff991.tar.gz |
Markdown reader: Modified to use Builder from pandoc-types 1.10.*.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 030e677c8..e21646446 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -39,7 +39,7 @@ import Data.Char ( isAlphaNum ) import Data.Maybe import Text.Pandoc.Definition import qualified Text.Pandoc.Builder as B -import Text.Pandoc.Builder (Inlines(..), Blocks, trimInlines, (<>)) +import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>)) import Text.Pandoc.Options import Text.Pandoc.Shared hiding (compactify) import Text.Pandoc.Parsing hiding (tableWith) @@ -48,7 +48,6 @@ import Text.Pandoc.Readers.HTML ( htmlTag, htmlInBalanced, isInlineTag, isBlockT isTextTag, isCommentTag ) import Text.Pandoc.XML ( fromEntities ) import Data.Monoid (mconcat, mempty) -import qualified Data.Sequence as Seq -- TODO leaky abstraction, need better isNull in Builder import Control.Applicative ((<$>), (<*), (*>), (<$)) import Control.Monad import Text.HTML.TagSoup @@ -94,7 +93,7 @@ isBlank _ = False -- isNull :: F Inlines -> Bool -isNull ils = Seq.null $ unInlines (runF ils def) +isNull ils = B.isNull $ runF ils def spnl :: Parser [Char] st () spnl = try $ do @@ -1020,8 +1019,7 @@ pipeTableRow = do return $ map (\ils -> case trimInlines ils of - -- TODO leaky abstraction: - ils' | Seq.null (unInlines ils') -> mempty + ils' | B.isNull ils' -> mempty | otherwise -> B.plain $ ils') cells' pipeTableHeaderPart :: Parser [Char] st Alignment |