diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-11-19 16:20:07 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-11-19 16:20:07 -0800 |
commit | 159c711675168ee590e1751ea214644d60873eb2 (patch) | |
tree | fb8eb4cd4837442f354ec30a5ee5ad452e8ecb19 /src/Text/Pandoc/Writers | |
parent | 7a5cb29319e6daae3ed1cf01a966ca3aac6bec22 (diff) | |
download | pandoc-159c711675168ee590e1751ea214644d60873eb2.tar.gz |
Fixed double-rendering of footnotes in RST tables.
Closes #1769.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index a96670c96..a8d0027f8 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -239,8 +239,7 @@ blockToRST (Table caption _ widths headers rows) = do middle = hcat $ intersperse sep' blocks let makeRow = hpipeBlocks . zipWith lblock widthsInChars let head' = makeRow headers' - rows' <- mapM (\row -> do cols <- mapM blockListToRST row - return $ makeRow cols) rows + let rows' = map makeRow rawRows let border ch = char '+' <> char ch <> (hcat $ intersperse (char ch <> char '+' <> char ch) $ map (\l -> text $ replicate l ch) widthsInChars) <> @@ -427,7 +426,7 @@ inlineToRST (Image alternate (source, tit)) = do return $ "|" <> label <> "|" inlineToRST (Note contents) = do -- add to notes in state - notes <- get >>= return . stNotes + notes <- gets stNotes modify $ \st -> st { stNotes = contents:notes } let ref = show $ (length notes) + 1 return $ " [" <> text ref <> "]_" |