erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.74k stars 1.12k forks source link

PHP notice when parsing _&_ #674

Closed maltsev closed 5 years ago

maltsev commented 5 years ago

Although the mentioned statement is parsed correctly a PHP notice is also generated:

<?php 
error_reporting(E_ALL);
require 'Parsedown.php';
$parser = new Parsedown;
echo $parser->text('black _&_ white');
// Notice: Uninitialized string offset: 1 in Parsedown.php on line 1483
// <p>black <em>&amp;</em> white</p>  

echo Parsedown::version;
// 1.8.0-beta-5

Same issue with [Black&](https://github.com).

aidantwoods commented 5 years ago

Thanks for the report! :)