improve fix for #184

This commit is contained in:
Emanuil Rusev 2015-01-15 21:32:18 +02:00
parent 6bee326c92
commit a06cdfb814
3 changed files with 7 additions and 3 deletions

View File

@ -910,7 +910,6 @@ class Parsedown
foreach ($matches[0] as $index => $cell)
{
$cell = trim($cell);
$cell = str_replace('\|', '|', $cell);
$Element = array(
'name' => 'td',
@ -1512,7 +1511,7 @@ class Parsedown
# Read-only
protected $specialCharacters = array(
'\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!',
'\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|',
);
protected $StrongRegex = array(

View File

@ -14,5 +14,9 @@
<td><code>|</code> 2.1</td>
<td>| 2.2</td>
</tr>
<tr>
<td><code>\|</code> 2.1</td>
<td><a href="/">link</a></td>
</tr>
</tbody>
</table>

View File

@ -1,4 +1,5 @@
| _header_ 1 | header 2 |
| ------------ | ------------ |
| _cell_ 1.1 | ~~cell~~ 1.2 |
| `|` 2.1 | \| 2.2 |
| `|` 2.1 | \| 2.2 |
| `\|` 2.1 | [link](/) |