1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

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

View File

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

View File

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