aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
-rw-r--r--test/tables.markdown16
-rw-r--r--test/tables.plain16
3 files changed, 17 insertions, 17 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 08dff2c4e..c8b3a1526 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -701,7 +701,7 @@ pandocTable opts multiline headless aligns widths rawHeaders rawRows = do
let columns = transpose (rawHeaders : rawRows)
-- minimal column width without wrapping a single word
let relWidth w col =
- max (floor $ fromIntegral (writerColumns opts) * w)
+ max (floor $ fromIntegral (writerColumns opts - 1) * w)
(if writerWrapText opts == WrapAuto
then minNumChars col
else numChars col)
diff --git a/test/tables.markdown b/test/tables.markdown
index 7f89bfc08..f5ee776fa 100644
--- a/test/tables.markdown
+++ b/test/tables.markdown
@@ -28,33 +28,33 @@ Simple table indented two spaces:
Multiline table with caption:
- --------------------------------------------------------------
+ -------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ -------------------------------------------------------------
: Here's the caption. It may span multiple lines.
Multiline table without caption:
- --------------------------------------------------------------
+ -------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ -------------------------------------------------------------
Table without column headers:
@@ -66,11 +66,11 @@ Table without column headers:
Multiline table without column headers:
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
diff --git a/test/tables.plain b/test/tables.plain
index e46317a6f..7013d0caa 100644
--- a/test/tables.plain
+++ b/test/tables.plain
@@ -28,33 +28,33 @@ Simple table indented two spaces:
Multiline table with caption:
- --------------------------------------------------------------
+ -------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ -------------------------------------------------------------
: Here’s the caption. It may span multiple lines.
Multiline table without caption:
- --------------------------------------------------------------
+ -------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ -------------------------------------------------------------
Table without column headers:
@@ -66,11 +66,11 @@ Table without column headers:
Multiline table without column headers:
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------
First row 12.0 Example of a row that
spans multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ -------------------------