@@ -993,27 +993,31 @@ pipeTable = try $ do
993 (heads,aligns) <- try ( pipeBreak >>= \als ->
993 (heads,aligns) <- try ( pipeBreak >>= \als ->
994 return (return $ replicate (length als) mempty, als))
994 return (return $ replicate (length als) mempty, als))
995 <|> ( pipeTableRow >>= \row -> pipeBreak >>= \als ->
995 <|> ( pipeTableRow >>= \row -> pipeBreak >>= \als ->
996 return (row, als) )
997 return (row, als) )
997− lines' <- fmap sequence $ many1 pipeTableRow
998+ lines' <- sequence <$> many1 pipeTableRow
998 blanklines
999 blanklines
999 let widths = replicate (length aligns) 0.0
1000 let widths = replicate (length aligns) 0.0
1000 return $ (aligns, widths, heads, lines')
1001 return $ (aligns, widths, heads, lines')
1002sepPipe :: Parser [Char] ParserState ()
1003sepPipe :: Parser [Char] ParserState ()
1005+ char '|' <|> char '+'
1003−sepPipe = try $ char '|' >> notFollowedBy blankline
1006+ notFollowedBy blankline
1008+-- parse a row, also returning probable alignments for org-table cells
1005pipeTableRow :: Parser [Char] ParserState (F [Blocks])
1009pipeTableRow :: Parser [Char] ParserState (F [Blocks])
1006pipeTableRow = do
1010pipeTableRow = do
1007 nonindentSpaces
1011 nonindentSpaces
1008 optional (char '|')
1012 optional (char '|')
1009 let cell = mconcat <$>
1013 let cell = mconcat <$>
1010− many (notFollowedBy (blankline <|> char '|') >> inline)
1014+ many (notFollowedBy (blankline <|> char '|') >> inline)
1011 first <- cell
1015 first <- cell
1013 rest <- cell `sepBy1` sepPipe
1017 rest <- cell `sepBy1` sepPipe
1014 optional (char '|')
1018 optional (char '|')
1015 blankline
1019 blankline
1016− let cells = sequence (first:rest)
1020+ let cells = sequence (first:rest)
1017 return $ do
1021 return $ do
1018 cells' <- cells
1022 cells' <- cells
1019 return $ map
1023 return $ map