Improve table parsing: support separator before header

This commit is contained in:
Niklas Fasching 2018-12-13 17:48:38 +01:00
parent cb81eb94de
commit c08119bbc8
4 changed files with 90 additions and 4 deletions

55
org/testdata/tables.html vendored Normal file
View file

@ -0,0 +1,55 @@
<figure>
<table>
<thead>
<th>a</th><th>b</th><th>c</th>
</thead>
<tbody>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>
</tbody>
</table>
<figcaption>
table with separator before and after header
</figcaption>
</figure>
<figure>
<table>
<thead>
<th>a</th><th>b</th><th>c</th>
</thead>
<tbody>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>
</tbody>
</table>
<figcaption>
table with separator after header
</figcaption>
</figure>
<figure>
<table>
<tbody>
<tr></tr>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>
</tbody>
</table>
<figcaption>
table without header (but separator before)
</figcaption>
</figure>
<figure>
<table>
<tbody>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>
</tbody>
</table>
<figcaption>
table without header
</figcaption>
</figure>

18
org/testdata/tables.org vendored Normal file
View file

@ -0,0 +1,18 @@
#+CAPTION: table with separator before and after header
|---+---+---|
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table with separator after header
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table without header (but separator before)
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table without header
| 1 | 2 | 3 |