Skip to content

Commit 6081954

Browse files
committed
resolve #154
1 parent d841003 commit 6081954

5 files changed

Lines changed: 53 additions & 4 deletions

File tree

Parsedown.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function setBreaksEnabled($breaksEnabled)
8686
'7' => array('List'),
8787
'8' => array('List'),
8888
'9' => array('List'),
89+
':' => array('Table'),
8990
'<' => array('Markup'),
9091
'=' => array('Setext'),
9192
'>' => array('Quote'),

tests/data/aesthetic_table.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<table>
2+
<thead>
3+
<tr>
4+
<th>header 1</th>
5+
<th>header 2</th>
6+
</tr>
7+
</thead>
8+
<tbody>
9+
<tr>
10+
<td>cell 1.1</td>
11+
<td>cell 1.2</td>
12+
</tr>
13+
<tr>
14+
<td>cell 2.1</td>
15+
<td>cell 2.2</td>
16+
</tr>
17+
</tbody>
18+
</table>

tests/data/aesthetic_table.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| header 1 | header 2 |
2+
| -------- | -------- |
3+
| cell 1.1 | cell 1.2 |
4+
| cell 2.1 | cell 2.2 |

tests/data/simple_table.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,23 @@
1515
<td>cell 2.2</td>
1616
</tr>
1717
</tbody>
18+
</table>
19+
<hr />
20+
<table>
21+
<thead>
22+
<tr>
23+
<th align="left">header 1</th>
24+
<th>header 2</th>
25+
</tr>
26+
</thead>
27+
<tbody>
28+
<tr>
29+
<td align="left">cell 1.1</td>
30+
<td>cell 1.2</td>
31+
</tr>
32+
<tr>
33+
<td align="left">cell 2.1</td>
34+
<td>cell 2.2</td>
35+
</tr>
36+
</tbody>
1837
</table>

tests/data/simple_table.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
| header 1 | header 2 |
2-
| -------- | -------- |
3-
| cell 1.1 | cell 1.2 |
4-
| cell 2.1 | cell 2.2 |
1+
header 1 | header 2
2+
-------- | --------
3+
cell 1.1 | cell 1.2
4+
cell 2.1 | cell 2.2
5+
6+
---
7+
8+
header 1 | header 2
9+
:------- | --------
10+
cell 1.1 | cell 1.2
11+
cell 2.1 | cell 2.2

0 commit comments

Comments
 (0)