mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-27 01:45:56 +00:00
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.
This commit is contained in:
@@ -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>
|
||||
```
|
||||
Reference in New Issue
Block a user