aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-11-23 10:50:35 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-11-23 13:29:25 -0800
commit79e6f8db13ef8f0db6da8fe4e17b7626fe6ef3e9 (patch)
treea5bda1b7fe45b9ad5d58dd348ceb195c6d30aa93 /test
parentb72ba3ed6dbf6de7ee23c8f5148648b599b49964 (diff)
downloadpandoc-79e6f8db13ef8f0db6da8fe4e17b7626fe6ef3e9.tar.gz
Improve detection of pipe table line widths.
Fixed calculation of maximum column widths in pipe tables. It is now based on the length of the markdown line, rather than a "stringified" version of the parsed line. This should be more predictable for users. In addition, we take into account double-wide characters such as emojis. Closes #7713.
Diffstat (limited to 'test')
-rw-r--r--test/command/7713.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/command/7713.md b/test/command/7713.md
new file mode 100644
index 000000000..d42dcd9b8
--- /dev/null
+++ b/test/command/7713.md
@@ -0,0 +1,28 @@
+```
+% pandoc
+| aaaaaaaaaaaa | bbbbb | ccccccccccc |
+| --- | --- | --- |
+| | | cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc |
+^D
+<table>
+<colgroup>
+<col style="width: 33%" />
+<col style="width: 33%" />
+<col style="width: 33%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>aaaaaaaaaaaa</th>
+<th>bbbbb</th>
+<th>ccccccccccc</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td></td>
+<td></td>
+<td>cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc</td>
+</tr>
+</tbody>
+</table>
+```