erusev / parsedown

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

Bug: Uninitialized string offset: 1 #850

Open hamedgasemi200 opened 1 year ago

hamedgasemi200 commented 1 year ago

When my text contains "&" sign in some specific places in the text, like the example below:

+ [What's the difference between semicolon and double ampersand &&](https://unix.stackexchange.com/questions/187145/whats-the-difference-between-semicolon-and-double-ampersand)

Parsedown returns the following error.

Bug: Uninitialized string offset: 1

I solved it by overwriting inlineSpecialCharacter, but please fix it.

protected function inlineSpecialCharacter($Excerpt)
{
    if (isset($Excerpt['text'][1])) parent::inlineSpecialCharacter($Excerpt);
}