mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6bee326c92 | |||
3fe867d294 |
@ -905,11 +905,12 @@ class Parsedown
|
||||
$row = trim($row);
|
||||
$row = trim($row, '|');
|
||||
|
||||
$cells = explode('|', $row);
|
||||
preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches);
|
||||
|
||||
foreach ($cells as $index => $cell)
|
||||
foreach ($matches[0] as $index => $cell)
|
||||
{
|
||||
$cell = trim($cell);
|
||||
$cell = str_replace('\|', '|', $cell);
|
||||
|
||||
$Element = array(
|
||||
'name' => 'td',
|
||||
|
@ -10,9 +10,8 @@ Better Markdown Parser in PHP
|
||||
* [Consistent](http://parsedown.org/consistency)
|
||||
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
|
||||
* [Tested](http://parsedown.org/tests/) in PHP 5.2, 5.3, 5.4, 5.5, 5.6 and [hhvm](http://www.hhvm.com/)
|
||||
* Extensible
|
||||
* [Extensible](https://github.com/erusev/parsedown/wiki/Writing-Extensions)
|
||||
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
|
||||
* [JavaScript port](https://github.com/hkdobrev/parsedown.js) under development
|
||||
|
||||
### Installation
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
<td><del>cell</del> 1.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>cell</code> 2.1</td>
|
||||
<td>cell 2.2</td>
|
||||
<td><code>|</code> 2.1</td>
|
||||
<td>| 2.2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -1,4 +1,4 @@
|
||||
| _header_ 1 | header 2 |
|
||||
| ------------ | ------------ |
|
||||
| _cell_ 1.1 | ~~cell~~ 1.2 |
|
||||
| `cell` 2.1 | cell 2.2 |
|
||||
| `|` 2.1 | \| 2.2 |
|
Reference in New Issue
Block a user