Markdown reader: Allow hard line breaks in table cells.
The \-newline form must be used; the two-space+newline form won't work, since in a table cell nearly every line ends with two spaces.
This commit is contained in:
parent
3cad665afb
commit
d9eff99f27
1 changed files with 3 additions and 3 deletions
|
@ -1126,12 +1126,12 @@ multilineTableHeader headless = try $ do
|
|||
then liftM (map (:[]) . tail .
|
||||
splitStringByIndices (init indices)) $ lookAhead anyLine
|
||||
else return $ transpose $ map
|
||||
(\ln -> tail $ splitStringByIndices (init indices) ln)
|
||||
(tail . splitStringByIndices (init indices))
|
||||
rawContent
|
||||
let aligns = zipWith alignType rawHeadsList lengths
|
||||
let rawHeads = if headless
|
||||
then replicate (length dashes) ""
|
||||
else map unwords rawHeadsList
|
||||
else map (unlines . map trim) rawHeadsList
|
||||
heads <- fmap sequence $
|
||||
mapM (parseFromString (mconcat <$> many plain)) $
|
||||
map trim rawHeads
|
||||
|
@ -1188,7 +1188,7 @@ gridTableHeader headless = try $ do
|
|||
-- RST does not have a notion of alignments
|
||||
let rawHeads = if headless
|
||||
then replicate (length dashes) ""
|
||||
else map unwords $ transpose
|
||||
else map (unlines . map trim) $ transpose
|
||||
$ map (gridTableSplitLine indices) rawContent
|
||||
heads <- fmap sequence $ mapM (parseFromString parseBlocks . trim) rawHeads
|
||||
return (heads, aligns, indices)
|
||||
|
|
Loading…
Reference in a new issue