git.iko.soy/typeable/pandoc
on master help sign in
Minor code cleanup.
commit52a6ec729749bc623cd60a66676a86fdbd190890 authorJohn MacFarlane <fiddlosopher@gmail.com> dateFri 25 Jan 2013, 19:50 (14 years ago) parentae74558
1 file changed+6−7
src/Text/Pandoc/Readers/Markdown.hs+6−7
src/Text/Pandoc/Readers/Markdown.hs+6−7
@@ -1041,7 +1041,7 @@ multilineTableHeader headless = try $ do
10411041 let aligns = zipWith alignType rawHeadsList lengths
10421042 let rawHeads = if headless
10431043 then replicate (length dashes) ""
1044− else map (intercalate " ") rawHeadsList
1044+ else map unwords rawHeadsList
10451045 heads <- fmap sequence $
10461046 mapM (parseFromString (mconcat <$> many plain)) $
10471047 map trim rawHeads
@@ -1098,10 +1098,9 @@ gridTableHeader headless = try $ do
10981098 -- RST does not have a notion of alignments
10991099 let rawHeads = if headless
11001100 then replicate (length dashes) ""
1101− else map (intercalate " ") $ transpose
1101+ else map unwords $ transpose
11021102 $ map (gridTableSplitLine indices) rawContent
1103− heads <- fmap sequence $ mapM (parseFromString parseBlocks) $
1104− map trim rawHeads
1103+ heads <- fmap sequence $ mapM (parseFromString parseBlocks . trim) rawHeads
11051104 return (heads, aligns, indices)
11061105
11071106gridTableRawLine :: [Int] -> MarkdownParser [String]
@@ -1622,9 +1621,9 @@ rawHtmlInline = do
16221621 guardEnabled Ext_raw_html
16231622 mdInHtml <- option False $
16241623 guardEnabled Ext_markdown_in_html_blocks >> return True
1625− (_,result) <- if mdInHtml
1626− then htmlTag isInlineTag
1627− else htmlTag (not . isTextTag)
1624+ (_,result) <- htmlTag $ if mdInHtml
1625+ then isInlineTag
1626+ else not . isTextTag
16281627 return $ return $ B.rawInline "html" result
16291628
16301629-- Citations