aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-09 01:24:49 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-09 01:24:49 +0000
commit0ceb538ecdad279fef6a966feb7f5a376b6edd1f (patch)
treecb1c21c536562462c1e8aa9023950e8086566f65 /src/Text/Pandoc/Writers/Markdown.hs
parentad7bb70cce7c54e18e09f4c1e2ea8d5c37b2ce4b (diff)
downloadpandoc-0ceb538ecdad279fef6a966feb7f5a376b6edd1f.tar.gz
Markdown writer:
Fixed a small problem with lengths of dashed lines in tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@659 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index a62988b20..66f0acc59 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -196,11 +196,11 @@ blockToMarkdown opts (Table caption aligns widths headers rows) = do
let tableWidth = sum widthsInChars
let maxRowHeight = maximum $ map heightOfBlock (head:rows')
let isMultilineTable = maxRowHeight > 1
- let border = if isMultilineTable
- then text $ replicate tableWidth '-'
- else empty
let underline = hsep $
map (\width -> text $ replicate width '-') widthsInChars
+ let border = if isMultilineTable
+ then text $ replicate (sum widthsInChars + (length widthsInChars - 1)) '-'
+ else empty
let spacer = if isMultilineTable
then text ""
else empty