git.iko.soy/typeable/pandoc
on master help sign in
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

commit0ceb538ecdad279fef6a966feb7f5a376b6edd1f authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 9 Jul 2007, 01:24 (19 years ago) parentad7bb70
2 files changed+7−8
src/Text/Pandoc/Writers/Markdown.hs+3−3 tests/tables.markdown+4−5
src/Text/Pandoc/Writers/Markdown.hs+3−3
@@ -196,11 +196,11 @@ blockToMarkdown opts (Table caption aligns widths headers rows) = do
196196 let tableWidth = sum widthsInChars
197197 let maxRowHeight = maximum $ map heightOfBlock (head:rows')
198198 let isMultilineTable = maxRowHeight > 1
199− let border = if isMultilineTable
200− then text $ replicate tableWidth '-'
201− else empty
202199 let underline = hsep $
203200 map (\width -> text $ replicate width '-') widthsInChars
201+ let border = if isMultilineTable
202+ then text $ replicate (sum widthsInChars + (length widthsInChars - 1)) '-'
203+ else empty
204204 let spacer = if isMultilineTable
205205 then text ""
206206 else empty
tests/tables.markdown+4−5
@@ -28,7 +28,7 @@ Simple table indented two spaces:
2828
2929Multiline table with caption:
3030
31− -----------------------------------------------------------
31+ --------------------------------------------------------------
3232 Centered Left Right Default aligned
3333 Header Aligned Aligned
3434 ----------- ---------- ------------ --------------------------
@@ -38,13 +38,13 @@ Multiline table with caption:
3838 Second row 5.0 Here's another one. Note
3939 the blank line between
4040 rows.
41− -----------------------------------------------------------
41+ --------------------------------------------------------------
4242
4343 Table: Here's the caption. It may span multiple lines.
4444
4545Multiline table without caption:
4646
47− -----------------------------------------------------------
47+ --------------------------------------------------------------
4848 Centered Left Right Default aligned
4949 Header Aligned Aligned
5050 ----------- ---------- ------------ --------------------------
@@ -54,7 +54,6 @@ Multiline table without caption:
5454 Second row 5.0 Here's another one. Note
5555 the blank line between
5656 rows.
57− -----------------------------------------------------------
57+ --------------------------------------------------------------
5858
5959
60−