diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-25 19:50:34 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-25 19:50:34 -0800 |
commit | 52a6ec729749bc623cd60a66676a86fdbd190890 (patch) | |
tree | ccd085a30ad6aad486b43f71708d008c60fe89f7 | |
parent | ae7455811461a7f5c7e1130dc1a31e45f6684c55 (diff) | |
download | pandoc-52a6ec729749bc623cd60a66676a86fdbd190890.tar.gz |
Minor code cleanup.
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 88ce86d38..d57a8ee5a 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1041,7 +1041,7 @@ multilineTableHeader headless = try $ do let aligns = zipWith alignType rawHeadsList lengths let rawHeads = if headless then replicate (length dashes) "" - else map (intercalate " ") rawHeadsList + else map unwords rawHeadsList heads <- fmap sequence $ mapM (parseFromString (mconcat <$> many plain)) $ map trim rawHeads @@ -1098,10 +1098,9 @@ gridTableHeader headless = try $ do -- RST does not have a notion of alignments let rawHeads = if headless then replicate (length dashes) "" - else map (intercalate " ") $ transpose + else map unwords $ transpose $ map (gridTableSplitLine indices) rawContent - heads <- fmap sequence $ mapM (parseFromString parseBlocks) $ - map trim rawHeads + heads <- fmap sequence $ mapM (parseFromString parseBlocks . trim) rawHeads return (heads, aligns, indices) gridTableRawLine :: [Int] -> MarkdownParser [String] @@ -1622,9 +1621,9 @@ rawHtmlInline = do guardEnabled Ext_raw_html mdInHtml <- option False $ guardEnabled Ext_markdown_in_html_blocks >> return True - (_,result) <- if mdInHtml - then htmlTag isInlineTag - else htmlTag (not . isTextTag) + (_,result) <- htmlTag $ if mdInHtml + then isInlineTag + else not . isTextTag return $ return $ B.rawInline "html" result -- Citations |