Open hamedgasemi200 opened 4 years ago
When my text contains: & in the header it returns an error. My Parsedown version is 1.8.0-beta-7
&
1.8.0-beta-7
protected function inlineSpecialCharacter($Excerpt) { if ($Excerpt['text'][1] !== ' ' and strpos($Excerpt['text'], ';') !== false and preg_match('/^&(#?+[0-9a-zA-Z]++);/', $Excerpt['text'], $matches) ) { return array( 'element' => array('rawHtml' => '&' . $matches[1] . ';'), 'extent' => strlen($matches[0]), ); } return; }
I solved it by overwriting the function
protected function inlineSpecialCharacter($Excerpt) { if(!isset($Excerpt['text'][1])) return; ...
When my text contains:
&
in the header it returns an error. My Parsedown version is1.8.0-beta-7
I solved it by overwriting the function