Closed BlackxSnow closed 1 year ago
It appears that changing ParsedownExtraPlugin.php:395
from ['handler']['argument']
to ['text']
resolves this issue. I'm unsure if it causes any side effects, but Parsedown::blockHeader does not create handler/argument
in its returned object.
What will happen if you add at least 1 space after #
. Most people use that preference to distinguish between Markdown headers with hash tags that come at the start of a paragraph.
Ah I should have mentioned that, it does the same thing with or without a space.
Please use the exact version of ParsedownExtra
0.8.0 for now.
I have the same issue as https://github.com/taufik-nurrohman/parsedown-extra-plugin/issues/29#issuecomment-1034113664, meaning 0.8.0 does not work for me.
I also haven't seen that issue with ParsedownExtra 0.8.1, so I'm not sure whether I've just not encountered it or if perhaps the index into ['text'] is actually correct (as this is what Parsedown seems to want from blockHeader, as best I understand).
Okay, if this is not an issue with Parsedown Extra 0.8.1 then that will be a good news for me too. With a little fix.
The problem is that your core Parsedown
package is using 1.7
where this plugin requires you to use 1.8
. Maybe your PHP version prevents you from installing the latest Parsedown
package. Yes, I can use ParsedownExtra
version 0.8.1
though.
Be sure to perform this task before installing:
Composer
From the file manager interface, create a
composer.json
file in your project folder, then add this content:{ "minimum-stability": "dev" }
PHP 8.2.1 ParsedownExtraPlugin 1.3.9 ParsedownExtra 0.8.1 Parsedown 1.7.4
Produced with:
The
print_r
of$Element
reports:Array\n(\n [name] => h1\n [text] => test\n [handler] => line\n [attributes] => Array\n (\n )\n\n)\n
Where[handler]
is indeed a string.