fix: fix blank line after table header (#2332)
This commit is contained in:
parent
5384d17d71
commit
6e1f9235dc
@ -369,7 +369,7 @@ export class Tokenizer {
|
|||||||
type: 'table',
|
type: 'table',
|
||||||
header: splitCells(cap[1]).map(c => { return { text: c }; }),
|
header: splitCells(cap[1]).map(c => { return { text: c }; }),
|
||||||
align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
|
align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
|
||||||
rows: cap[3] ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
|
rows: cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
|
||||||
};
|
};
|
||||||
|
|
||||||
if (item.header.length === item.align.length) {
|
if (item.header.length === item.align.length) {
|
||||||
|
@ -36,3 +36,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<pre><code>code
|
<pre><code>code
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>y</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
@ -10,3 +10,6 @@
|
|||||||
| - |
|
| - |
|
||||||
| x |
|
| x |
|
||||||
code
|
code
|
||||||
|
| y |
|
||||||
|
| - |
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user